Would you like to react to this message? Create an account in a few clicks or log in to continue.



 
HomeTheAppleBytesLatest imagesMailRegisterLog in

Share | 
 

 Creating a "Splash Screen" for a Excel Workbook.

View previous topic View next topic Go down 
AuthorMessage
PHOENiX.505
Administrator
Administrator


Location : Noida, India
iPoints : 63430
Warning Level : Safe

Creating a "Splash Screen" for a Excel Workbook. Empty
PostSubject: Creating a "Splash Screen" for a Excel Workbook.   Creating a "Splash Screen" for a Excel Workbook. Icon_minitime16th March 2011, 9:38 pm

Steps :
1)Create your workbook as usual.

2)Activate the Visual Basic Editor and insert a new UserForm into the project by pressing ALT+F11. 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)Now Double Click The UserForm (Not The Label) And Then Select Initialize From The Procedure Box, Top Right Of The Screen.

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

Private Sub Workbook_Open()
UserForm1.Show
End Sub

6)Insert the following subroutine into the code module for UserForm1:

Private Sub UserForm_Activate()
Application.OnTime Now + TimeValue("00:00:05"), "KillTheForm"
End Sub

7)Insert the following subroutine into a normal VBA module:

Private Sub KillTheForm()
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 KillTheForm) 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 KillTheForm subroutine simply unloads the UserForm.
Back to top Go down
http://www.theapplebytes.com
 

Creating a "Splash Screen" for a Excel Workbook.

View previous topic View next topic Back to top 

 Similar topics

-
» Break Excel Workbook Internal Passwords using a Macro
» 'COUNT' Function in MS Excel.
» Hide Cell Contents in Microsoft Excel
» Why iPhones have 3.5 Inch Screen Size ??
» Change the Mac Login Screen Background
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
 :: . . : : Tips Tricks & Tweaks : : . . :: . . : : Microsoft Office : : . . :: . . : : Microsoft Excel : : . .-
Free forum | Art, Culture and Leisures | High-Tech and Multimedia | ©phpBB | Free forum support | Report an abuse | Forumotion.com
© Copyright TheAppleBytes | All Rights Reserved.