Startup Screen Fade Away

sbeatton

Active Member
Joined
May 19, 2004
Messages
411
Hello all

I have created a startup screen for my workbook but am having difficulties getting it to fade away/turn off. At the moment when the workbook is started up the startup screen shows however it does not close. My VBA is

Code for Userform:
Sub UserForm1_Activate()
Application.OnTime Now + TimeValue("00:00:03"), "KillTheForm"
End Sub

Code for "KillTheForm" in Module 1
Sub KillTheForm()
Unload UserForm1
End Sub

Anyone have any ideas?

Thanks
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
The name of the activate event procedure is wrong. The best way to get this kind of stuff correct is to let XL do it for you. In the userform code module, at the top of the programming pane there are two drop downs. From the first (Object) drop down select 'userform'. From the 2nd (Procedure) dropdown select 'Activate.' XL will insert a skeleton procedure using the correct syntax.
 
Upvote 0
I have gone through what you suggested tusharm and it has inserted the following two procedures

Private Sub UserForm_Activate()

End Sub

Private Sub UserForm_Click()

End Sub

Do I insert my code
Application.OnTime Now + TimeValue("00:00:03"), "KillTheForm"

into the first?

I am not sure what the Click() procedure is for.

Would you explain further for me?

Thanks,
 
Upvote 0
Yes to the first question though you could just as easily have discovered the answer for yourself by trying it. {grin}

The second procedure lets one write code that responds to the click event. You can delete that sub. To learn more about the click event check XL VBA help.

sbeatton said:
I have gone through what you suggested tusharm and it has inserted the following two procedures

Private Sub UserForm_Activate()

End Sub

Private Sub UserForm_Click()

End Sub

Do I insert my code
Application.OnTime Now + TimeValue("00:00:03"), "KillTheForm"

into the first?

I am not sure what the Click() procedure is for.

Would you explain further for me?

Thanks,
 
Upvote 0
Thanks Tushar

It is now working perfect. I didn;t know about the drop boxes (self taught). Very Useful.
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,262
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top