Splash Screen Problem

sbeatton

Active Member
Joined
May 19, 2004
Messages
411
I have been following the instructions in this thread from Joe as below.

http://www.mrexcel.com/board2/viewtopic.php?t=26964&highlight=splash+screen+startup

Setting it up
Follow these instructions to create a splash screen for your project.
1. Create your workbook as usual.
2. Activate the Visual Basic Editor and insert a new UserForm into the project. The code here assumes this form is named UserForm1.
3. Place any controls you like on UserForm1. For example, you may want to insert an Image control that has your company's logo. Also, you may want to set the UserForm's Caption property to an empty string.
4. Insert the following subroutine into the code module for the ThisWorkbook object:
Private Sub Workbook_Open()
UserForm1.Show
End Sub
5. Insert the following subroutine into the code module for UserForm1:
Private Sub UserForm_Activate()
Application.OnTime Now + TimeValue("00:00:05"), "KillTheForm"
End Sub
6. Insert the following subroutine into a normal VBA module:
Private Sub KillTheForm()
Unload UserForm1
End Sub

My problem is I can;t seem to get the screen to disappear after 5 secs. Is it a problem with the code or just me?

Thanks,
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Hi, sbeatton,

this is working for me
to test very quickly just use
Application.OnTime Now, "KillTheForm"
your form should disappear at once

if you cannot get it to work send me an email
I'll return a working sample

kind regards,
Erik
 
Upvote 0
This is all you need - although the other code does allow other things to happen meantime. I think the problem is that it is Private. Could try deleting that.
Code:
Private Sub UserForm_Activate()
    Application.Wait Now + TimeValue("00:00:05")
    Unload Me
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,394
Messages
6,178,341
Members
452,841
Latest member
GenAkaman

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