Microsoft KB Archive/185162

= XL98: How to Create a Startup Screen with a UserForm =

Article ID: 185162

Article Last Modified on 6/17/2005

-

APPLIES TO


 * Microsoft Excel 98 for Macintosh

-



This article was previously published under Q185162



SUMMARY
In Microsoft Excel 98, you can use a custom UserForm and a Visual Basic for Applications macro to create a startup screen (splash screen). This article describes how to create a custom splash screen for a specific workbook.



MORE INFORMATION
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. A splash screen is a screen that is displayed for a designated amount of time when you start a program. You can create a UserForm and run a macro to simulate a splash screen. After a specified amount of time elapses, the macro hides the dialog box without any user interaction. To create a sample splash screen, use the following steps.

Create a Workbook_Open Macro
 Save and close any open workbooks, and then create a new workbook. With the workbook active, start the Visual Basic Editor (press OPTION+F11). Click Project Explorer on the View menu to display the Project Explorer window. In the Project Explorer window, double-click ThisWorkbook in the current project. In the Object drop-down, click Workbook.  Enter the code so that the Workbook_Open procedure resembles the following: Private Sub Workbook_Open

UserForm1.Show ' Show the form each time the workbook is opened

End Sub </ol>

Create a Form and a Userform_Activate Macro
<ol> Click UserForm on the Insert menu.</li> Double-click the UserForm.</li> In the Procedure drop-down, click Activate.</li>  Enter the code so that the UserForm_Activate procedure resembles the following: Private Sub UserForm_Activate

Application.Wait Now + TimeValue("00:00:05") ' Wait 5 seconds UserForm1.Hide                              ' Hide the form

End Sub </li> Click Microsoft Excel on the View menu, and then save and close the workbook.</li></ol>

When you reopen the workbook, the form will appear for 5 seconds, and then disappear.

Additional query words: dialog XL98

Keywords: kbhowto kbprogramming KB185162

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.