XL: Problems Using Show Method to Open Dialog SheetsLast reviewed: February 3, 1998Article ID: Q111308 |
The information in this article applies to:
SUMMARYIn Microsoft Excel, when you use the Show method to display a dialog box, the dialog box must be closed or hidden before you can return to the Visual Basic procedure that called it.
MORE INFORMATIONThe Show method runs a specified dialog box, either by running event procedures immediately, or by running the dialog box and waiting for the user to enter data. If the dialog box is called during a procedure in which another dialog box is already present, the Show method will run the dialog box on top of the present dialog box. To return to the calling procedure, the second dialog box must be closed or hidden.
Closing the Dialog BoxIf the dialog box has a button with the DismissButton property set to TRUE: When you Click a button with the DismissButton property set to TRUE, you will automatically close a user-defined dialog box. This is the preferred approach, because the DismissButton property will validate all edit fields before closing the dialog box and the Show method will return TRUE if validation succeeds. If validation does not succeed, an alert is displayed and the invalid edit field is activated. If your dialog box does not contain a DismissButton that is set to TRUE, the dialog box can be closed by doing one of the following:
REFERENCESFor more information about the Show Method, click the Search button in Visual Basic help and type:
Show MethodFor more information about the Hide Method, click the Search button in Visual Basic help and type:
Hide MethodFor more information about the DismissButton Procedure, click the Search button in Visual Basic help and type:
DismissButton ProcedureFor more information about the CancelButton Procedure, click the Search button in Visual Basic help and type:
CancelButton Procedure |
Additional query words: 5.00 7.00 8.00 97 VB memory VBE
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |