Button on Userform to Stop a Macro

S

Steph

I've created a simple add-in with code that loops through a large range of
data. I would like to add a button to the userform that allows the operator
to stop the macro at any time. Is there code or a command that I could
include in a button-click event that would allow the user to stop the macro?
 
J

JLGWhiz

Why not just teach them to use Ctl + Break? Or build in a break point in
your code that they can then restart. VBA does not lend itself to easily
stopping and restarting at a user's convenience.
 
Top