Create a Splash Screen in Excel

0 Flares 0 Flares ×

A splash screen is a screen which loads when you open a program. A splash screen can be used to display a company logo, advertise and provide information to the user.

To create a splash screen in Excel, you need to create a userform and then use some simple VBA to show the userform when opening a workbook, and make it disappear after a certain amount of time.

  1. Open the Visual Basic Editor by pressing Alt + F11
  2. Create a userform and set it up how you would like

Splash screen in Excel

  1. Double click on the ThisWorkbook project in the Project Explorer to open its code module and enter the code below (ComputergagaSplash is the name of the userform).

Private Sub Workbook_Open()


End Sub

  1. Double click on the userform to open its code module, and enter the code below that uses the userform’s activate event. The activate event runs when the userform opens.

Private Sub Userform_Activate()

  Application.OnTime Now + TimeValue(“00:00:05”), “CloseForm”

End Sub

The OnTime method is used to set a time that in 5 seconds from now will run a procedure called CloseForm.

The TimeValue can be changed to set the timer of your choice.

  1. Open a code module and enter the following code to create a procedure called CloseForm that unloads the userform.

Private Sub CloseForm()

  Unload ComputergagaSplash

End Sub

  1. Save and close the workbook. Open the workbook and the splash screen should display for 5 seconds.

Related Tutorials

Use the Offset property in VBA

Simulate a dice throw in Excel

2 thoughts on “Create a Splash Screen in Excel

Leave a Reply

Your email address will not be published. Required fields are marked *