Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Splash Screen Behavior
XL2003 on XP
I have a UserForm set up as a splash screen that fires with WorkBook code: Private Sub Workbook_Open() Userform1.Show End Sub Sub KillForm() Unload Userform1 End Sub And the code behind the UserForm: Private Sub UserForm_Initialize() Application.OnTime Now + TimeValue("00:00:06"), "KillForm" End Sub If the user kills the splash screen before it times out, and then closes the application without closing the instance of Excel, the application will start up again after the selected time out period. After that, even if the splash screen times out, this repeats when you try to close only the application. Can anyone explain what causes this effect? -- Al C |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Splash Screen Behavior
(untested)
In the UserForm_QueryClose event, add a copy of the ontime procedure with the Schedule parameter set to False. -- Jim Cone Portland, Oregon USA "Al" wrote in message XL2003 on XP I have a UserForm set up as a splash screen that fires with WorkBook code: Private Sub Workbook_Open() Userform1.Show End Sub Sub KillForm() Unload Userform1 End Sub And the code behind the UserForm: Private Sub UserForm_Initialize() Application.OnTime Now + TimeValue("00:00:06"), "KillForm" End Sub If the user kills the splash screen before it times out, and then closes the application without closing the instance of Excel, the application will start up again after the selected time out period. After that, even if the splash screen times out, this repeats when you try to close only the application. Can anyone explain what causes this effect? -- Al C |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Splash Screen Behavior
At the top of a normal module, say same as the one that contains "KillForm"
Public gdtMyOnTime As Date ' add a new line to Sub KillForm Sub KillForm() gdtMyOnTime = 0 Unload Userform1 End Sub in the form Private Sub UserForm_Initialize() gdtMyOnTime = Now + TimeValue("00:00:06") Application.OnTime gdtMyOnTime, "KillForm" End Sub Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) If mdtMyOnTime Then Application.OnTime gdtMyOnTime , "KillForm", schedule:=False End If End Sub Regards, Peter T "Al" wrote in message ... XL2003 on XP I have a UserForm set up as a splash screen that fires with WorkBook code: Private Sub Workbook_Open() Userform1.Show End Sub Sub KillForm() Unload Userform1 End Sub And the code behind the UserForm: Private Sub UserForm_Initialize() Application.OnTime Now + TimeValue("00:00:06"), "KillForm" End Sub If the user kills the splash screen before it times out, and then closes the application without closing the instance of Excel, the application will start up again after the selected time out period. After that, even if the splash screen times out, this repeats when you try to close only the application. Can anyone explain what causes this effect? -- Al C |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Splash screen | Excel Programming | |||
splash screen | Excel Programming | |||
Splash screen and various screen resolutions | Excel Programming | |||
Splash Screen | Excel Programming | |||
VBA splash screen | Excel Programming |