This documentation is archived and is not being maintained.

WorkbookEvents_Event.Activate Event 

Occurs when a workbook is activated.

Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in microsoft.office.interop.excel.dll)

'Usage
WithEvents workbookEvents_Event1 As WorkbookEvents_Event
Function workbookEvents_Event1_Activate() As Void
	Handles workbookEvents_Event1.Activate
End Function

event WorkbookEvents_ActivateEventHandler Activate;
 void add_Activate(WorkbookEvents_ActivateEventHandler handler);
 void remove_Activate(WorkbookEvents_ActivateEventHandler handler);
In JScript, you can handle the events defined by a class, but you cannot define your own.

When you switch between two windows showing the same workbook, the WindowActivate event occurs, but the Activate event for the workbook doesn't occur.

This event doesn't occur when you create a new window.


Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

Show: