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
 

Some videos you may like

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
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?
 

Smitty

Legend
Joined
May 15, 2003
Messages
29,536
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!)
 

Watch MrExcel Video

Forum statistics

Threads
1,123,271
Messages
5,600,646
Members
414,398
Latest member
dhune

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
Top