Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All
I have a UserForm on which I wish to start a timer and display the time by the second, until another event stops it. Currently I store the time in a variable as the first event fires, then subtract that from the time when the second event fires, that is OK and gives me total time, but does not lend itself to be displayed on the UserForm. Any ideas? -- Regards, Nigel |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Paste this in to your userform module...
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Private Sub UserForm_Activate() DoEvents Sleep 3000 ' Time in milliseconds Unload Me End Sub Assign youruserformname.show to whatever event you want "Nigel" wrote: Hi All I have a UserForm on which I wish to start a timer and display the time by the second, until another event stops it. Currently I store the time in a variable as the first event fires, then subtract that from the time when the second event fires, that is OK and gives me total time, but does not lend itself to be displayed on the UserForm. Any ideas? -- Regards, Nigel |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Timer | Excel Worksheet Functions | |||
Timer | Excel Programming | |||
Stopping a Timer / Running a timer simultaneously on Excel | Excel Discussion (Misc queries) | |||
timer | Excel Programming | |||
Timer | Excel Programming |