R
rvExcelTip
The attached workbook (zipped) contains two empty Worksheets (Sheet1 an
2). I wanted to test when the first WorkSheet (say Sheet1) get
activated, Therefore I added several Event procedures, each containin
a simple Debug.Print statement.
To my surprise the Activate event NEVER fired when opening th
workbook.
The sequence of recorded event was as follows:
WorkBook_open
WorkBook_Activate
WorkBook_Window_Activate
WorkBook_Window_WorkSheet_Sheet1_Activate
The latter statement caused by a WorkSheets("Sheet1").Activate metho
coded in the Window_Activate event.
Even then, the Debug.Print statement in the WorkSheet_Activate event o
Sheet1 never fired!!
However if you now switch to Sheet2, the Sheet1 gets DeActivated a
the next sequence of events clearly shows:
Sheet1_DeActivate
WorkBook_SheetDeactivate
Sheet2_Activate
WorkBook_SheetActivate
So three questions.
- When gets a WorkSheet activated?
- What does it mean to get Activated? (According to MS the Activat
Method Activates a Worksheet!!!)
- Is there somewhere a publication that explains the sequence of event
supposed to take place in excel?
2). I wanted to test when the first WorkSheet (say Sheet1) get
activated, Therefore I added several Event procedures, each containin
a simple Debug.Print statement.
To my surprise the Activate event NEVER fired when opening th
workbook.
The sequence of recorded event was as follows:
WorkBook_open
WorkBook_Activate
WorkBook_Window_Activate
WorkBook_Window_WorkSheet_Sheet1_Activate
The latter statement caused by a WorkSheets("Sheet1").Activate metho
coded in the Window_Activate event.
Even then, the Debug.Print statement in the WorkSheet_Activate event o
Sheet1 never fired!!
However if you now switch to Sheet2, the Sheet1 gets DeActivated a
the next sequence of events clearly shows:
Sheet1_DeActivate
WorkBook_SheetDeactivate
Sheet2_Activate
WorkBook_SheetActivate
So three questions.
- When gets a WorkSheet activated?
- What does it mean to get Activated? (According to MS the Activat
Method Activates a Worksheet!!!)
- Is there somewhere a publication that explains the sequence of event
supposed to take place in excel?