Hi
I have a workbook which opens to to a specific worksheet called "Inrto", is it possible to have it change to worksheet "Input" automaticly after say 15 seconds.
Many Thanks
Braddy
Hi
I have a workbook which opens to to a specific worksheet called "Inrto", is it possible to have it change to worksheet "Input" automaticly after say 15 seconds.
Many Thanks
Braddy
If you are a fool at forty, you will always be a fool

This month, every Windows Secrets subscriber can download a one-chapter excerpt of Windows 7: The Missing Manual.Windows 7: The Missing Manual provides valuable information to help you overcome these difficulties in learning a new operating system. Subscribe today to download your free excerpt.
You can create a Workbook_Open event procedure in the ThisWorkbook module:
Private Sub Workbook_Open()
Application.Cursor = xlWait
Worksheets("Intro").Activate
Application.Wait Now + TimeSerial(0, 0, 15)
Worksheets("Input").Activate
Application.Cursor = xlDefault
End Sub
Note: 15 seconds is quite long, especially if the user has opened the workbook before.
Hi Hans
Thanks for the code, I accept your point about the time. I have changed it to 5 seconds,
I see you spotted my typo of Intro.
Braddy
If you are a fool at forty, you will always be a fool
Hi Hans
I tried to hide the sheet "Intro" after the timer has run by adding the line Sheets("Intro").Select.Visible = False but this is obviously wrong because I get an error can advise please.
Many Thanks
Braddy
Private Sub Workbook_Open()
Application.Cursor = xlWait
Worksheets("Intro").Activate
Application.Wait Now + TimeSerial(0, 0, 5)
Worksheets("Input").Activate
Application.Cursor = xlDefault
Sheets("Intro").Select.Visible = False
End Sub
If you are a fool at forty, you will always be a fool
There is not "select" in it:
Sheets("Intro").Visible = False
Steve
PMFJI
Sheets("Intro").Visible = False
will do
Wolf
Hi Steve
Thanks to you and Wolf for your replies.
Most Grateful
Braddy
If you are a fool at forty, you will always be a fool
Hi Steve
For the benefit of anyone following this thread, you also have to put this at the beginning of the code, Sheets("Intro").Visible = True.
Otherwise it goes straight Input.
Many Thanks
Braddy
If you are a fool at forty, you will always be a fool
Hans,
I've never known about Wait!!! I've always used Application.OnTime Now + TimeSerial(0, 0, 15). I see that wait pauses a macro. Is the OnTime also similar? Can you use DoEvents while it is paused?
Regards,
Rudi
All's well that ends with an answer in WOPR!
Wait pauses execution of a macro for that time.
OnTime does not pause anything. It sets a timer to run the specified macro after the time period elapses or at a given time
Steve
Cheers Steve.
Regards,
Rudi
All's well that ends with an answer in WOPR!