Workbook Deactivate

I

incjourn

I am using the following code in ThisWorkbook:

Private Sub Workbook_Deactivate()
MsgBox "Deactivating Workbook"
End Sub

This works fine in most cases. However, if I have selected an imbedde
chart on a worksheet, I find the macro doesn't run.

Can anyone help
 
J

jmoffat

You could try selecting an other portion of the sheet

eg

sheets(1).select
range("a1").select

this will ensure that no graph is selected and you can close th
workbook as per the rest of your code
 
Top