Still stuck
Mark,
Try this. Put a label on your userform and the following code in the form
activate event.
Private Sub UserForm_Activate()
Dim i
Dim newhour
Dim newminute
Dim newsecond
Dim waittime
For i = 10 To 0 Step -1
newhour = Hour(Now())
newminute = Minute(Now())
newsecond = Second(Now()) + 1
waittime = TimeSerial(newhour, newminute, newsecond)
Application.Wait waittime
DoEvents
Me.Label1 = i
Next
Unload UserForm1
End Sub
Neil
"Mark (InWales)" wrote in message
...
Hello world
Still can't find the solution to this problem. I have a userform that
shows for 10 seconds as a splash screen on the workbook_open event. What
I would like to do is have a countdown timer from 10 to 1 to show the user
that something is happening. I can get the textbox to show the intial
value but I am having real problems in getting it to count down so the
user can see the changes! 10 to 1 in under a second! I have looked at
the ontime method, wait, pause method etc but don't seem to be able to get
the correct syntax...
Office 97 and XP home
Mark (InWales)
|