IsOpen Property

Microsoft Office Visual Basic

True if the specified HTML project item is open in the Microsoft Script Editor. Read-only Boolean.

Example

This example determines whether the specified HTML project item is open. and if it is, the example then loads script from the specified file.

If ActiveWorkbook.HTMLProject.HTMLProjectItems _
    .Item(1).IsOpen Then
    ActiveWorkbook.HTMLProject.HTMLProjectItems _
        .Item(1).LoadFromFile ("C:\MyScript.txt")
Else
    MsgBox "The HTMLProjectItem is not open."
End If