Code to allow stopping of Workbook_Open() by User

egiannaros

New Member
Joined
Mar 14, 2008
Messages
42
I have a Workbook_Open() Macro that works perfectly right now. The macro is set up as a workbook open (workbook open, forces the macro to run when the file is opened) so I can run the process overnight using Windows Task Scheduler.

All I need to do now is to add some code that will generate a pop up window with a button that the user can click in order to stop the macro from executing if he/she chooses to do so. I would like the window to be visible for 5 seconds.

The point of this is to allow the user to stop the macro from running (besides using Ctrl+Break).

Any help would be greatly appreciated. Thanks.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,215,418
Messages
6,124,793
Members
449,189
Latest member
kristinh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top