adding a splash screen to an existing user form app

mortgageman

Well-known Member
Joined
Jun 30, 2005
Messages
2,015
I found this which showed me how to make a splash screen in Excel:
http://www.youtube.com/watch?v=WPUiSiDMkkU

What I would like to know is how to make a splash screen that shows itself for a few seconds - but then I want my other user form (my main application) to start by itself.

Thanks in advance

Gene Klein
 

Tom Urtis

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,197
Just on the face of it without testing, have you tried to simply place the line

myUserForm.Show (change the name to whatever your userform name is)

after her "KillTheForm" execution but before End Sub
 

mortgageman

Well-known Member
Joined
Jun 30, 2005
Messages
2,015
Just on the face of it without testing, have you tried to simply place the line

myUserForm.Show (change the name to whatever your userform name is)

after her "KillTheForm" execution but before End Sub
I guess this is dumb - but does that mean I would have to name my splash-screen user form a different name then userform1 to avoid name conflicts?


Gene Klein
 

Tom Urtis

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,197
Well, yes but you'd need to have a unique name for each userform in your workbook anyway, splash screen or not.
 

mortgageman

Well-known Member
Joined
Jun 30, 2005
Messages
2,015
Just on the face of it without testing, have you tried to simply place the line

myUserForm.Show (change the name to whatever your userform name is)

after her "KillTheForm" execution but before End Sub
Here is what I tried:


Code:
Private Sub UserForm_Initialize()
Application.Goto Reference:="lookaway"
UserForm2.Show
TimeValue ("00:00:05"), "KillTheForm"
<rest of my original code that worked without a problem before>
end sub
 
Private Sub KillTheForm()
Unload UserForm2
End Sub

Here is the error I got:
Wrong number of arguments or invalid property assignment

Thanks in advance

Gene Klein
 

mortgageman

Well-known Member
Joined
Jun 30, 2005
Messages
2,015
Hello,

Without having watched the video, have you seen J-Walk's page on this?

http://j-walk.com/ss/excel/tips/tip39.htm

You want the OnTime Method.
Code:
Private Sub UserForm_Initialize()
Application.Goto Reference:="lookaway"
UserForm2.Show
With UserForm1
****code that worked when I only had one user form****
 Private Sub UserForm_Activate()
    Application.OnTime Now + TimeValue("00:00:05"), "KillTheForm"
End Sub
Private Sub KillTheForm()
Unload UserForm2
End Sub
Ok - this is "working" in the sense that I do not get an error message, but it is not "splashing" - i.e. I have to click the x on the top of the (first) form to make it go away. After I do, the second form correctly shows up.

Help?

Gene Klein
 

NateO

Legend
Joined
Feb 17, 2002
Messages
9,700
Hello, try this, place the following in the UserForm1 Module:

Code:
Private Sub UserForm_Initialize()
Application.OnTime Now + TimeValue("00:00:05"), _
    "KillTheForm"
End Sub
And place this in a Normal module:

Code:
Private Sub KillTheForm()
UserForm1.Hide: Unload UserForm1
Load UserForm2: UserForm2.Show
End Sub
It's a bit of a matter of naming conventions, location and order of operations. Change the Form's names as appropriate.
 

mortgageman

Well-known Member
Joined
Jun 30, 2005
Messages
2,015
Hello, try this, place the following in the UserForm1 Module:

Code:
Private Sub UserForm_Initialize()
Application.OnTime Now + TimeValue("00:00:05"), _
    "KillTheForm"
End Sub
And place this in a Normal module:

Code:
Private Sub KillTheForm()
UserForm1.Hide: Unload UserForm1
Load UserForm2: UserForm2.Show
End Sub
It's a bit of a matter of naming conventions, location and order of operations. Change the Form's names as appropriate.
Perfect. Thanks

Gene Klein
 

Forum statistics

Threads
1,085,009
Messages
5,381,193
Members
401,718
Latest member
Ereese20

Some videos you may like

This Week's Hot Topics

Top