Userform to hide after x number of seconds

Lee.

Board Regular
Joined
Dec 15, 2012
Messages
170
Hi,
I'm trying to create a "tour" so to speak in excel for the latest updates to a spreadsheet.

I have the text wrote in a userform, and then I was the userform to be displayed for around 3 seconds for people to read it before the macro continues to the next stage.

However, I seem to have to manually close the userform before it goes to the next stage.

Here is the macro I have written

Code:
Sub sample()
With zScript
    .Label1 = "An option has been added to allow you to enable automated handoff emails."
    .Show
End With
Application.Wait (Now + TimeValue("0:00:03"))
zScript.Hide
With Sheets("Home").CheckBox21
    .BackColor = &HFF&
    .ForeColor = &HFFFFFF
End With
Application.Wait (Now + TimeValue("0:00:02"))
With zScript
    .Label1 = "To enable automated emails, please tick the box."
    .Show
End With
Application.Wait (Now + TimeValue("0:00:02"))
zScript.Hide
With Sheets("Home").CheckBox21
    .BackColor = &HFFFFFF
    .ForeColor = &HFF&
End With
End Sub

I want
1. Message to appear
2. Close after 3 seconds
3. Check box to change colour to highlight it
4. New message to appear 2 seconds later
5. That message to then close after a further 2 seconds
6. Then the check box to change back to the original colour

Regards
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Forum statistics

Threads
1,214,891
Messages
6,122,101
Members
449,066
Latest member
Andyg666

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