ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Button on Userform to Stop a Macro (https://www.excelbanter.com/excel-programming/418071-button-userform-stop-macro.html)

Steph

Button on Userform to Stop a Macro
 
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?

--
Steph

JLGWhiz

Button on Userform to Stop a Macro
 
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.

"Steph" wrote:

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?

--
Steph


Barb Reinhardt

Button on Userform to Stop a Macro
 
You may be able to find something here.

http://en.allexperts.com/q/Visual-Ba...s-Function.htm
--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"Steph" wrote:

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?

--
Steph



All times are GMT +1. The time now is 11:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com