Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
al al is offline
external usenet poster
 
Posts: 363
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Splash screen Steve Excel Programming 6 August 9th 05 04:53 PM
splash screen animated text in excel worksheet Excel Programming 2 February 4th 05 07:51 PM
Splash screen and various screen resolutions George J Excel Programming 4 October 3rd 04 10:15 PM
Splash Screen Michelle Excel Programming 2 August 10th 04 11:04 AM
VBA splash screen scott[_6_] Excel Programming 2 October 16th 03 09:27 AM


All times are GMT +1. The time now is 05:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"