VBA: Show timer on sheet then hide sheet

bamaisgreat

Well-known Member
Joined
Jan 23, 2012
Messages
794
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
 

Some videos you may like

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

CMAnslow

New Member
Joined
Nov 11, 2012
Messages
45
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
 

bamaisgreat

Well-known Member
Joined
Jan 23, 2012
Messages
794
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,109,393
Messages
5,528,477
Members
409,818
Latest member
JiNXX9500

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top