XL98: No Trappable Events for Dialog Sheets and Macro Sheets

ID: Q183325

The information in this article applies to:

SYMPTOMS

Microsoft Excel 98 Macintosh Edition supports many more event handlers than earlier versions of Microsoft Excel. You can use these event handlers with the Application, Worksheet, Chart Sheet, and Workbook objects; however, there is no support for trapping events on Dialog Sheets or Macro Sheets.

CAUSE

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

WORKAROUND

You may be able to trap some events that occur on either dialog sheets or macro sheets but you can do this only for the workbook object. The following table lists all of the workbook-level events and whether the event occurs 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 of Microsoft Excel.

REFERENCES

For more information about trapping events, in the Visual Basic Editor 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.

Additional query words: XL98

Keywords          : kbprg 
Version           : MACINTOSH:98
Platform          : MACINTOSH
Issue type        : kbinfo

Last Reviewed: April 3, 1998