IsOpen Property

Microsoft FrontPage Visual Basic

True if the specified Web page is displayed in the page window. Read-only Boolean.

expression.IsOpen

expression    Required. An expression that returns a WebFile object.

Example

The following example uses the IsOpen property to check if a file named "index.htm" is open, and opens it if it isn't.

Private Sub CheckForOpenFile()
    Dim myWeb As WebEx
    Dim myFiles As WebFiles
    Dim myFile As WebFile

    Set myWeb = ActiveWeb
    Set myFiles = myWeb.RootFolder.Files

    With myWeb
        For Each myFile In myFiles
            If myFile.Name = "index.htm" Then
                If myFile.IsOpen = True Then
                    MsgBox "This file is open, try again later."
                    Exit Sub
                Else
                    myFile.Open
                    Exit Sub
                End If
            End If
        Next
    End With
End Sub