SubViewMode Property

Microsoft FrontPage Visual Basic

Show All Show All

SubViewMode Property

Returns or sets an FpWebSubView constant that determines the view type in the current sub window. Read/write.

FpWebSubView can be one of these FpWebSubView constants.
fpWebSubViewFolders Change the current sub window view to Folders view.
fpWebSubViewNavigation Change the current sub window to Navigation view.
fpWebSubViewNone Close the current sub window.

expression.SubViewMode

expression    Required. An expression that returns a WebWindowEx object.

Example

The following example prompts the user to open the sub window in Folders view if the sub window is not currently visible. If the sub window is currently open, the user is not prompted and the program ends.

    Sub SubModeType()
'Modifies the sub window view mode of the current web window

    Dim objApp As FrontPage.Application
    Dim objWebwdw As WebWindowEx
    Dim strAns As String

    Set objApp = FrontPage.Application
    Set objWebwdw = objApp.ActiveWebWindow
    'Check if the sub window is open or closed
    If objWebwdw.SubViewMode = fpWebSubViewNone Then
        strAns = MsgBox("The subwindow is not visible." & _
                        "Would you like to view the subwindow?", vbYesNo)
        'Prompt the user to open the subwindow
        If strAns = vbYes Then
            'Change the sub window to Folder view
            objWebwdw.SubViewMode = fpWebSubViewFolders
        End If
    End If

End Sub