Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Application Level Events
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Application Level Events
You can read more about application events at Chip Pearson's site:
http://www.cpearson.com/excel/AppEvent.aspx FYI: these events fire when you stay within Excel. If you swap applications, they don't fire. Kent Prokopy wrote: 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. -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Application Level Events
You can put this in the ThisWorkbook code module. Substitute your macro name
for myMacro. Private Sub Workbook_Deactivate() Call myMacro End Sub "Kent Prokopy" wrote: 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. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Application Level Events
I found this information in one of the other posts just before you replied.
This is just what I needed. Thank you very much! "Dave Peterson" wrote: You can read more about application events at Chip Pearson's site: http://www.cpearson.com/excel/AppEvent.aspx FYI: these events fire when you stay within Excel. If you swap applications, they don't fire. Kent Prokopy wrote: 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. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Application level events - calling from standard module | Excel Programming | |||
Application level events | Excel Programming | |||
Code: Using Excel Application level Events | Excel Programming | |||
Application Level Events Question | Excel Programming | |||
Application level events no longer execute | Excel Programming |