Splash Screen

F

Fred Flintstone

Hi all,

I am trying to work out a way I can customise a splash screen to load up
before (or while) my actual Excel template loads up, just like the Excel
splash screen loads when Excel is loading. You see, I have just created a
number of templates and would like to personalise them with a more
professional look.

Thank you all in advance for your help.
 
F

Fable

On your workbook
Activate the Visual Basic Editor and insert a new UserForm into the
project. The code here assumes this form is named UserForm1.

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.

Insert the following subroutine into the code module for the
ThisWorkbook object:

Private Sub Workbook_Open()
UserForm1.Show
End Sub
Insert the following subroutine into the code module for UserForm1:
Private Sub UserForm_Activate()
Application.OnTime Now + TimeValue("00:00:05"), "Unloadme"
End Sub
Insert the following subroutine into a normal VBA module:
Private Sub Unloademe()
Unload UserForm1
End Sub

How it works
When the workbook is opened, the Workbook_Open subroutine is executed.
This subroutine displays the UserForm. When the UserForm is displayed,
it's Activate event occurs - which triggers the UserForm_Activate
subroutine. This subroutine uses the OnTime method of the Application
object to execute a subroutine (named Unloadme) at a particular time.
In this case, the time is five seconds from the current time (change
this interval by modifying the argument for the TimeValue function).
The Unloadme subroutine simply unloads the UserForm.

Fable
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top