Application Level Events

  • Thread starter Thread starter Kent Prokopy
  • Start date Start date
K

Kent Prokopy

I need a way to have a sub within my xla to run every time any workbook gets
or losses focus. So if a new workbook is opened or closed, or you just switch
back and forth between two workbooks.
 
You can put this in the ThisWorkbook code module. Substitute your macro name
for myMacro.

Private Sub Workbook_Deactivate()
Call myMacro
End Sub
 
I found this information in one of the other posts just before you replied.
This is just what I needed.

Thank you very much!
 
Back
Top