Private Sub expression_OnActivate( )
expression A variable which references an object of type PageWindowEx or WebWindowEx declared with events in a class module.
Example
The following example uses the IsDirty property to determine if the page shown in the specified window has changed since the last refresh or save and saves the document that has changed.
Private Sub PageWindowEx_OnActivate()
'Displays a message when the window obtains focus
If PageWindowEx.IsDirty Then
PageWindowEx.Save
End If
End Sub