The following example illustrates using the AppActivate event with an Application
object. To use the AppActivate event with a Workspace object, you do not need
to initialize the App variable.
Public WithEvents App As Application
'To receive and handle events from
progeCAD, first initialize the App variable.
Set App = ThisWorkspace.Application
Private Sub App_AppActivate()
' This example receives an Application
' This event occurs immediately
before an application window or workspace is activated.
' To fire this event:
' 1) Run init() function to initialize
' 2) Activate an application window.
MsgBox "Application window
is about to be activated."