Counter for Msgbox

BenNV

Board Regular
Joined
Mar 27, 2002
Messages
160
I have a message box output when I click a button. I want the message box to act as a counter say, it counts 3, 2, 1 then the msg box automatically goes. So, it is acting as a countdown. Is this possible?
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
On 2002-04-15 03:18, BenNV wrote:
I have a message box output when I click a button. I want the message box to act as a counter say, it counts 3, 2, 1 then the msg box automatically goes. So, it is acting as a countdown. Is this possible?

Do you mean a timed msgbox where by it displays for 3 secs then cancels and takes a default setting ??
 
Upvote 0
Thanks for the reply.

Yes, I just want a 3 second timer and after the 3 secs, the msg box goes and goes back to the workbook without any changes. Like a wait 3 seconds command.
 
Upvote 0
no, you cannot change the msgbox text once it is shown, or cancel the dialog programmatically.

your best bet is to create a small userform with just a text label on it, then use this form to do what you want.
 
Upvote 0
I'm not sure if this would work with a message box. But if you could use a "userform" instead, you can use this code in the userform:

Private Sub UserForm_Activate()
Application.Wait Now + TimeValue("00:00:03")
Userform1.Hide
End Sub
 
Upvote 0
On 2002-04-15 06:18, daleyman wrote:
no, you cannot change the msgbox text once it is shown, or cancel the dialog programmatically.

your best bet is to create a small userform with just a text label on it, then use this form to do what you want.

Yes you can cancell a msgbox programatically
You have to use the Address of functon and
the system Timer.
 
Upvote 0

Forum statistics

Threads
1,214,400
Messages
6,119,284
Members
448,885
Latest member
LokiSonic

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