XL: Displaying Several Dialog Boxes Without LoopingLast reviewed: September 2, 1997Article ID: Q125805 |
5.00 5.00c 7.00 97 | 5.00 5.00a
WINDOWS | MACINTOSHkbprg kbcode The information in this article applies to:
SUMMARYIn Microsoft Excel, when you create a macro that displays several dialog boxes, you may want to display and hide the dialog boxes with some method other than a Do While...Loop. For example, a Do While...Loop may not be the most effective method if you want to cycle through several dialog boxes at a time. The loop is not the best method in this case, because, when you use this method, a dialog box is still being displayed and remains on the stack, even after the dialog box has been dismissed. Instead of using a Do While ...Loop, you can use the OnTime method to run the macro at a specified time. Note, however, that when you use this method, there may be a delay before each dialog box is displayed (this delay does not occur with the looping method). To create an example that uses the OnTime method to display dialog boxes, follow the procedure in the "More Information" section of this article. For additional information about solving this problem with the looping method, please see the following article(s) in the Microsoft Knowledge Base:
ARTICLE-ID: Q111867 TITLE : XL5 Err Msg: "Not Enough Stack Space to Run Macro" MORE INFORMATION
Visual Basic Code ExampleMicrosoft provides examples of Visual Basic for Applications 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. The Visual Basic procedures in this article are provided 'as is' and Microsoft does not guarantee that they can be used in all situations. While Microsoft support engineers can help explain the functionality of a particular macro, they will not modify these examples to provide added functionality, nor will they help you construct macros to meet your specific needs. If you have limited programming experience, you may want to consult one of the Microsoft Solution Providers. Solution Providers offer a wide range of fee-based services, including creating custom macros. For more information about Microsoft Solution Providers, call Microsoft Customer Information Service at (800) 426-9400. Use the following steps to create a Visual Basic procedure that uses command buttons to cycle through four dialog boxes:
|
Additional reference words: 7.00 5.00 5.00c
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |