View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] EagleOne@discussions.microsoft.com is offline
external usenet poster
 
Posts: 391
Default VBA to monitor/alert when/if a ActiveCodePane.Window = "General" has focus

2003, 2007

The following will work when executed.

If Application.VBE.VBProjects.VBE.ActiveCodePane.Wind ow.Caption = "General" Then
MsgBox Application.VBE.VBProjects.VBE.ActiveCodePane.Wind ow.Caption & " is Open"
End if

How can the same logic be coded into a "Monitor" event? Similar to "On error goto" where if a error
occurs while executing a sub proceedure.

In short, when a user opens a specific VBProject code window (Caption: = "General") Then
a MsgBox displays a message like above.

TIA EagleOne