Excel VBA Multiple Automatic Goal Seek Required – Please Assist us
It's a hierarchy Bob. In this case it's two levels.
Starting from the lowest level:
Worksheet
Workbook or Application
It's actually called Workbook_Sheetchange in fact.
The event cascades from bottom (sheet) to top (book), it's easy enough to check the order with msgbox. A couple of events, for example mouse events have a Cancel parameter which can be set to True to stop the cascade at that level but the Sheet Change event is not one of them. The Sheet Change events are however raised sequentially, so the worksheet level event handling routine (if present) is run to completion before the workbook (application) level event is raised. Thus avoiding the potential for conflict.
The reason I say workbook (application) is because they are one in the same thing. It's complicated, but when you add a Workbook_SheetChange routine in the ThisWorkbook module you are actually processing the Application.SheetChange routine.
|