"Time Event" for opening sheets?

windsurfit

Board Regular
Joined
Mar 27, 2003
Messages
228
Below is the code for having excel open to a specific sheet, in this case it is named "cover".

I have used this design similar to a splash screen whereby I have the code:

Private Sub UserForm_Activate()
Application.OnTime Now + TimeValue("00:00:03"), "KillTheForm"
End Sub


My question is how to place this same type of time delay so that it slows down the "cover" sheet on my code below for a few seconds before hiding this sheet & opening my "working" sheets. This initial "cover" sheet has instructions that need more time for viewing & right now the more powerfull the computer the faster this "cover" opens and then hides.

BTW-I do not have any splash screen in this program so I need to place a form of this TimeValue into this code below:

Suggesions?


Private Sub UnhideSheets()
Dim sht As Object

Application.ScreenUpdating = False

For Each sht In ThisWorkbook.Sheets

sht.Visible = xlSheetVisible

Next sht

ThisWorkbook.Sheets("cover").Visible = xlSheetVeryHidden

Application.ScreenUpdating = True

End Sub
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
This should show your sheet, pause for 3 seconds, and then hide the sheet. Is this what you are looking for?

<table width="100%" border="1" bgcolor="White" style="filter:progid:DXImageTransform.Microsoft.Gradient(endColorstr='#C0CFE2', startColorstr='#FFFFFF', gradientType='0');"><tr><TD><font size="2" face=Courier New>  <font color="#0000A0">With</font> ThisWorkbook.Sheets("cover")
       .Activate
       Application.ScreenUpdating = <font color="#0000A0">True</font>
       Application.Wait Now + TimeSerial(0, 0, 3)
       .Visible = xlSheetVeryHidden
  <font color="#0000A0">End</font> <font color="#0000A0">With</font>

</FONT></td></tr></table><button onclick='document.all("101420065219453").value=document.all("101420065219453").value.replace(/<br \/>\s\s/g,"");document.all("101420065219453").value=document.all("101420065219453").value.replace(/<br \/>/g,"");window.clipboardData.setData("Text",document.all("101420065219453").value);'>Copy to Clipboard</BUTTON><textarea style="position:absolute;visibility:hidden" name="101420065219453" wrap="virtual">
With ThisWorkbook.Sheets("cover")
.Activate
Application.ScreenUpdating = True
Application.Wait Now + TimeSerial(0, 0, 3)
.Visible = xlSheetVeryHidden
End With
</textarea>
 
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,033
Members
448,940
Latest member
mdusw

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