Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This way UserForm1 never closes if CommandButton2 is clicked.
And in case of the MsgBox, Userform1 closes after the MsgBox is dismissed. In other words, MsgBox keeps the timer from firing until it is dismissed. Thanks. Emile Perhaps: Regular Code Module: Public dFireTIme As Double UserForm1: Private Sub UserForm_Activate() dFireTime = Now + TimeSerial(0, 0, 5) Application.OnTime dFireTime, "closeThisForm" End Sub Private Sub CommandButton2_Click() Application.OnTime dFireTime, "closeThisForm", Schedule:=False UserForm2.Show End Sub UserForm2: Private Sub UserForm_Deactivate() Application.OnTime Now + TimeSerial(0, 0, 1), "closeThisForm" End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find %ontime & SUMIF ontime ie: find matching sets within Range... | Excel Worksheet Functions | |||
OnTime bug? | Excel Discussion (Misc queries) | |||
OnTime VB | Excel Worksheet Functions | |||
OnTime Help | Excel Programming | |||
OnTime event not firing in Workbook_Open event procedure | Excel Programming |