XL5: "No Documents" Menu Bar Displayed When Document Is Open |
In Microsoft Excel version 5.0, when you run a Visual Basic, Applications
Edition, macro that displays a dialog box while there are no documents in
the application window, and if a control is assigned to the dialog box that
opens, unhides, or adds a workbook when the dialog box is dismissed or
hidden, you may experience the following problems:
Excel caused a General Protection Fault in module EXCEL.EXE at 0042:0CBE
To work around this problem, create a macro that displays the dialog box
and, if OK is clicked, adds a new workbook after the dialog box is hidden.
When you assign macros to controls on a dialog sheet, the macro is run and
then the dialog box is hidden.
Microsoft 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 professionals 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.
Sub ShowDialogToAddWorkbook()
Dim Response as Integer
Response = Thisworkbook.DialogSheets(1).Show
If Response then Workbooks.Add
End Sub Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft Excel for Windows version 5.0c.
The Show method for dialog boxes will return a value of False (or 0) under
the following conditions:
Additional query words:
Keywords : kbcode
Version : 5.00
Platform : WINDOWS
Issue type :
Technology :
|
Last Reviewed: September 20, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |