WindowDeactivate Event

       

Occurs when a web window is deactivated.

Private Sub expression_WindowDeactivate(ByVal pWebWindow As WebWindow)

expression   The variable name of an object of type Application declared with events in a class module.

pWebWindow   The WebWindowEx object.

Example

The following example prompts the user to close the window when the window loses focus.

Private Sub expression_WindowDeactivate(ByVal pWebWindow As WebWindow)
'Occurs when a Microsoft FrontPage window loses focus.

    Dim strAns As String
    strAns = MsgBox("Do you want to close this window?" _
                     & pWebWindow.Caption & "?", _
                     vbYesNo)
    If strAns = vbYes Then
        pWebWindow.Close
    End If

End Sub