XL5: Incorrect Results/GP Fault Double-Clicking Toolbar Area

Last reviewed: September 12, 1996
Article ID: Q121400
The information in this article applies to:
  • Microsoft Excel for Windows, version 5.0

SYMPTOMS

In Microsoft Excel, if you use the OnDoubleClick property in a Visual Basic procedure, or the ON.DOUBLECLICK function in a version 4.0 macro to assign a macro to run when you double-click on a worksheet or chart, one of the following occurs when you double-click on the toolbars area:

  • The macro that you assigned is run

    -or-

  • You receive a general protection (GP) fault

CAUSE

This behavior occurs when you use the following in a Visual Basic procedure

   Workbooks("BOOK1.XLS).Worksheets("Sheet1").OnDoubleClick = "Test"

or the following in a version 4.0 Macro

   =ON.DOUBLECLICK("[Book1]Sheet1", "Macro1!Test")

to assign the macro TEST to run when you double-click on Sheet1 in BOOK1.XLS, and you then double-click on the toolbars area.

If BOOK1.XLS is open when you double-click on the toolbars area, the macro TEST runs. If you close BOOK1.XLS, and then double-click on the toolbars area in the same session of Microsoft Excel, you receive a GP fault.

WORKAROUNDS

To avoid receiving a GP fault, when you have used either the OnDoubleClick property or the ON.DOUBLECLICK function in the current session of Microsoft Excel, do not double-click on the toolbars area. Instead, do either of the following:

  • From the View menu, choose the Toolbars command to display the Toolbars dialog box.

    -or-

  • Close Microsoft Excel.

STATUS

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 version 5.0c.

MORE INFORMATION

You can use the OnDoubleClick property or the ON.DOUBLECLICK function to set the name of a macro to run whenever you double-click anywhere on the specified chart or sheet. When you run the procedure that contains this property, or the macro that contains this function, the assigned macro should not run when you double-click in the toolbar area. Instead, the toolbars dialog box should be displayed.

REFERENCES

For more information about the OnDoubleClick Property, choose the Search button in the Visual Basic Reference and type:

   OnDoubleClick Property

For more information about ON.DOUBLECLICK, choose the Search button in Microsoft Excel Macro Functions Help and type:

   ON.DOUBLECLICK function


KBCategory: kbprg
KBSubcategory:

Additional reference words: 5.00 gpf



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.