Jaafar Tribak
Well-known Member
- Joined
- Dec 5, 2002
- Messages
- 9,797
- Office Version
- 2016
- Platform
- Windows
Hi,
Contrary to many other excel object model events, the Window Deactivate event does not provide a ByRef Cancel argument.
I was wondering if there is some workaround so that we could choose whether to allow the workbook window to be closed or to abort the closing action.
I am targeting the Window Deactivate event because it also fires when attempting to close a workbook window.
Obviously, we are talking here about a workbook that has more than one window. Otherwise, we could use the BeforeClose event.
I am open to your suggestions.
Regards.
Contrary to many other excel object model events, the Window Deactivate event does not provide a ByRef Cancel argument.
I was wondering if there is some workaround so that we could choose whether to allow the workbook window to be closed or to abort the closing action.
I am targeting the Window Deactivate event because it also fires when attempting to close a workbook window.
Obviously, we are talking here about a workbook that has more than one window. Otherwise, we could use the BeforeClose event.
I am open to your suggestions.
Regards.