closed Property

Microsoft FrontPage Visual Basic

closed Property

Returns a Boolean that represents whether the referenced window is closed. True indicates that the window is closed.

expression.closed

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

The following example displays a message stating whether the parent window of the specified document is closed. Use the CallIsWindowClosed subroutine below to call this subroutine.

    Sub IsWindowClosed(ByRef objDoc As FPHTMLDocument)
    Select Case objDoc.parentWindow.closed
        Case False
            MsgBox "The parent window of the specified document is opened."
        Case True
            MsgBox "The parent window of the specified document is closed."
    End Select
End Sub
  

Use the following example to call the IsWindowClosed subroutine above.

    Sub CallIsWindowClosed()
    Call IsWindowClosed(objDoc:=ActiveDocument)
End Sub