Visible Property Example

The GetVisibleState procedure returns the visible state of the first PageWindow object from the CheckIfVisible function.

Private Sub GetVisibleState()
Dim myIsVisible As Boolean

myIsVisible = CheckIfVisible
End Sub

Function CheckIfVisible() As Boolean
Dim myPage As PageWindow
Dim myVisibleState As Boolean

Set myPage = Application.Webs(0).WebWindows(0).PageWindows(0)

myVisibleState = myPage.Visible
CheckIfVisible = myVisibleState
End Function

This example sets the visible state of a WebWindow object to a windowless state.

Private Sub OpenInNoWindow()
Dim myWebWindow As WebWindow

Set myWebWindow = Webs(0).WebWindows(0)

myWebWindow.Visible = False
End Sub