XL Macro: Timed Message Box?

ggelineau

Board Regular
Joined
May 24, 2005
Messages
69
I have built a large macro to format an xl workbook and I was considering adding a message box at the end of the macro that tells the user the macro has ended just before the macro workbook closes itself. Is it possible to use a msg box (or some other box...not sure what exists) that states the Macro has ended and then disappears after a certain amount of time (like five seconds)?

If not, perhaps a message box that only allows the user to hit an "OK" button and then promptly makes the msg box disapear and the macro workbook close.

Also, is it possible to have a macro close the workbook that contains the actual macro (after the macro has completed its run)?

Any insight would be most appreciated.

Thanks,
G
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Just place the MsgBox at the end of your code.
Code:
 MsgBox "Macro has completed"

lenze

Wouldn't simply using a Formatted template be easier?
 
Upvote 0
Do a board search for "Progress Bar", as there've been a bunch of discussions on how to notify users that code is running.

To close the wb you can use: ThisWorkbook.Close True (to save it, False not to)

HTH,

(Heya Lenze!)
 
Upvote 0

Forum statistics

Threads
1,214,944
Messages
6,122,392
Members
449,081
Latest member
JAMES KECULAH

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