W
William
I've encountered a problem with Excel where the deactivate events (for
workbook and window) don't fire in certain situations.
The steps to re-create the problem are:
1. You need to have two or more workbooks open in the same instance of Excel
2. In one of the workbooks, enter some code to detect the deactivate events
(eg. a message box) and save it
3. In another workbook, make some changes but don't save yet
4. Switch to the workbook with the VBA deactivate code and click the 'x'
(close) button for the whole Excel application
5. Excel should ask you to save the other workbook. Click 'Yes' and Excel
should close but the deactivate event doesn't get fired for the active
workbook.
Does anyone else have the same problem?
It is important for what I am doing that there is a deactivate event for
every activate event. I've not been able to find any information about this
problem. The version of Excel I am using is 2000 with SP3. I know that this
problem also occurs with Excel 2003.
If this is a known problem, can someone please direct me to where it is
documented and a workaround if available?
Thank you all
workbook and window) don't fire in certain situations.
The steps to re-create the problem are:
1. You need to have two or more workbooks open in the same instance of Excel
2. In one of the workbooks, enter some code to detect the deactivate events
(eg. a message box) and save it
3. In another workbook, make some changes but don't save yet
4. Switch to the workbook with the VBA deactivate code and click the 'x'
(close) button for the whole Excel application
5. Excel should ask you to save the other workbook. Click 'Yes' and Excel
should close but the deactivate event doesn't get fired for the active
workbook.
Does anyone else have the same problem?
It is important for what I am doing that there is a deactivate event for
every activate event. I've not been able to find any information about this
problem. The version of Excel I am using is 2000 with SP3. I know that this
problem also occurs with Excel 2003.
If this is a known problem, can someone please direct me to where it is
documented and a workaround if available?
Thank you all