Webs Property

Microsoft FrontPage Visual Basic

Returns the collection of open Web sites for the specified object.

expression.Webs

expression Required. An expression that returns an Application object.

Example

The following example creates an array that contains all of the URLs for all the open subsites in your Web site.

Note  You must open any Web sites for which you wish to retrieve the URLs.

Private Sub GetWebs()
    Dim myWebs As Webs
    Dim myWeb As WebEx
    Dim myOpenWebs() As Variant
    Dim i As Integer
    Dim myWebCount As Integer

    Set myWebs = Application.Webs
    myWebCount = myWebs.Count

    ReDim myOpenWebs(myWebCount)

    Do
        For Each myWeb In myWebs
                myOpenWebs(i) = myWeb.Url
                i = i + 1
        Next
    Loop Until i > myWebCount

End Sub