MrExcel Publishing
Your One Stop for Excel Tips & Solutions time frame?

Posted by Paul Magruder on February 26, 2001 8:41 AM

Is there code that will allow a form to be shown for a specified time frame? (10 sec)?

Can I specify the amount of time in between?
Thanks in advance.
Paul Magruder

Posted by Dax on February 26, 2001 12:44 PM


This should do what you're after:-

Private Sub UserForm_Activate()
t = Timer
Loop Until Timer = t + 10
End Sub

Posted by David Hawley on February 27, 2001 3:32 AM

Hi Paul

I'm guessing you are wanting to create a splash screen on opening of your Workbook. If so:

1. Right click on the sheet picture , top left next to "File" and select "View Code". Paste in this:

Private Sub Workbook_Open()
Run "ShowForm"
End Sub

Then in a normal module place these:

Sub CloseForm()
Unload UserForm1
End Sub

Sub CloseForm()
Application.OnTime Now + TimeValue("00:00:10"), "CloseForm"
End Sub


OzGrid Business Applications

Posted by Paul Magruder on February 27, 2001 5:00 AM

Re: Thanks

Posted by Paul Magruder on February 27, 2001 5:01 AM

Re: Thanks