XL97: No Trappable Events for Dialog Sheets and Macro Sheets

Last reviewed: March 13, 1998
Article ID: Q166146
The information in this article applies to:
  • Microsoft Excel 97 for Windows

SYMPTOMS

Microsoft Excel 97 supports many more event handlers than earlier versions of Microsoft Excel. These event handlers can be used with the Application, Worksheet, Chart Sheet and Workbook objects, but there is no support for trapping events on Dialog Sheets or Macro Sheets.

CAUSE

For reasons of backward-compatibility you can insert dialog sheets and macro sheets into your Microsoft Excel 97 workbook, but there are no sheet- level events for these two types of sheets.

RESOLUTION

You may be able to trap some events that occur on either dialog sheets or macro sheets, but only for the workbook object. The following table lists all of the workbook-level events and whether or not the event is fired for dialog sheets and macro sheets:

                          Triggered for      Triggered for
   Event                  Dialog Sheet       Macro Sheet
   -------------------------------------------------------

   Activate                   yes               yes
   AddinInstall               no                no
   AddinUninstall             no                no
   BeforeClose                yes               yes
   BeforePrint                yes               no
   BeforeSave                 yes               yes
   Deactivate                 yes               yes
   NewSheet                   yes               yes
   Open                       yes               yes
   SheetActivate              yes               no
   SheetBeforeDoubleClick     no                no
   SheetBeforeRightClick      no                no
   SheetCalculate             no                no
   SheetChange                no                no
   SheetDeactivate            yes               no
   SheetSelectionChange       no                no
   WindowActivate             yes               yes
   WindowDeactivate           yes               yes
   WindowResize               yes               yes

STATUS

This behavior is by design.

REFERENCES

For more information about Trapping Events, click the Office Assistant, type "trapping events" (without quotation marks), click Search, and then click to view the "Using events with Microsoft Excel objects" topic.

Keywords          : kbcode kbprg
Version           : WINDOWS:97
Platform          : WINDOWS


================================================================================


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: March 13, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.