VBA: Show timer on sheet then hide sheet

bamaisgreat

Well-known Member
Joined
Jan 23, 2012
Messages
821
Office Version
  1. 365
Platform
  1. Windows
I have a sheet named SEND FORM that has some info that I would like for the user to see for about 10sec when he opens the work book and then it will hide and show the sheet they will be working in named STOCK CUTTING FORM.. Also is it possible to have the 10 sec timer to be shown in cell L12 in the SEND FORM sheet... I already have a couple of things in my open event which are below
Code:
Private Sub Workbook_Open()
 Call RunOnTime
 Call ShowMsg
 End Sub
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Hi,

The following code works for this, however the watch out is if the 1 sec delay misses the timestamp it goes into an infinte loop.

Private Sub Workbook_Open()
Sheets(1).Visible = True
Sheets(2).Visible = False
icounter = 10
Do Until icounter = 0
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 1
waitTime = TimeSerial(newHour, newMinute, newSecond)
Range("B2").Value = icounter
Application.Wait waitTime
icounter = icounter - 1
Loop
Sheets(2).Visible = True
Sheets(1).Visible = False
End Sub

Would be interested if theres a better way of doing it
 
Upvote 0
ok I will try this. Why would it miss the time stamp? If it does go into a loop what can I do to stop it? Thanks for your response.
 
Upvote 0

Forum statistics

Threads
1,214,929
Messages
6,122,317
Members
449,081
Latest member
tanurai

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