Excel: How to Use a Custom Dialog Box as a Startup ScreenLast reviewed: September 2, 1997Article ID: Q136222 |
The information in this article applies to:
SUMMARYIn Microsoft Excel, it is possible to use a custom dialog box and a Visual Basic, Applications Edition, procedure together to create a startup (or "splash") screen.
MORE INFORMATIONA splash screen is a dialog box that is shown on the screen for a specified amount of time. When the specified amount of time has elapsed, the dialog box is hidden without any user interaction.
Visual Basic Code ExampleMicrosoft provides examples of Visual Basic procedures for illustration only, without warranty either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. This Visual Basic procedure is provided 'as is' and Microsoft does not guarantee that it can be used in all situations. Microsoft does not support modifications of this procedure to suit customer requirements for a particular purpose. The following Visual Basic code will show a custom dialog box and hide the dialog box after 5 seconds have elapsed. If you want the dialog box to be displayed for more than 5 seconds, change the time that is specified in the macro. This example assumes that you have created a custom dialog box named "Dialog1." To run the example, position the insertion point in the "Sub ShowDialog()" line and press F5.
'------------------------------------------------ Sub ShowDialog() DialogSheets("Dialog1").Show End Sub 'Attach this to the frame of the dialog box. Sub OnShow() Application.SendKeys "~" MsgBox "This will not be displayed." Application.Wait Now + TimeValue("00:00:05") DialogSheets("Dialog1").Hide End Sub '------------------------------------------------NOTE: To attach a macro to the frame of a dialog box, follow one of the procedures below.
|
Additional query words: 7.00 5.00 splash
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |