XL5: File Opened by Dialog Box Macro Is Not Recognized as Open

Last reviewed: September 12, 1996
Article ID: Q110560
The information in this article applies to:

- Microsoft Excel for Windows, version 5.0

SYMPTOMS

When you use a Visual Basic or a Microsoft Excel 4.0 macro assigned to a button or other item in a dialog box to open a file, the File and Help menus may be the only menus displayed on the menu bar. This behavior is incorrect; when you open a non-hidden workbook, the workbook menu bar should be displayed.

When you attempt to edit or close the open workbook, you may receive a general protection (GP) fault.

WORKAROUNDS

To open the file so that worksheet menu bar is visible, do any of the following:

  • Click the title bar of the document or resize the document window.

    -or-

  • Open or unhide another file.

    -or-

  • In the macro that called the dialog box, activate the workbook window after you use the Dialog.Show command. For example, use the following command:

          Workbooks("bookname").Activate
    

REFERENCES


KBCategory: kbusage
KBSubcategory:

Additional reference words: 5.00 error application



THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 12, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.