need help with timer in excel

I

ionaman

In the attached excel file, I am wondering is anyone able to put a time
on it for me. When the Hint button is pressed a text GUI appears. I wa
wondering does anyone know how to just have this GUI appear for 3
seconds. all help and comments appreciated

Attachment filename: latestversion.xls
Download attachment: http://www.excelforum.com/attachment.php?postid=51011
 
B

Bob Phillips

See response in Misc or programming. Don't post all over the place.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
K

Ken Macksey

Hi

If by GUI you mean a userform, then this will do what you want.
It is a splash screen, but can be modified to suit.
Create a userform and name it splashForm and put the following code in the
userform activate sub..

Private Sub UserForm_Activate()

Dim PauseTime As Integer
Dim Start As Single

PauseTime = 10 ' Set duration in seconds.
Start = Timer ' Set start time.
a = 1 ' set countdown start to 1
Splashform.Caption = "This form will close in " & PauseTime & "
Seconds."
Do While Timer < Start + PauseTime

If Timer >= Start + a Then
Splashform.Caption = "This form will close in " & PauseTime - a & "
Seconds."
a = a + 1
End If

DoEvents ' Yield to other processes.
Loop
Unload Me


End Sub

HTH

Ken
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top