Lists Property

       

Returns a Lists collection object that represents a collection of all lists in the current web. A list can be either a DocumentLibrary object, BasicList object or a Survey object.

expression.Lists

expression   Required. An expression that returns one of the objects in the Applies To list.

Example

The following example returns a reference to the Lists collection using the web object's Lists property. The example displays the name of each list in the collection.

Sub ViewLists()
'Returns a collection of all lists in the web

    Dim objApp As FrontPage.Application
    Dim objWeb As WebEx
    Dim objlists As Lists
    Dim objlist As List
    Set objApp = FrontPage.Application
    Set objWeb = objApp.ActiveWeb
    'Reference the Lists collection
    Set objlists = objWeb.Lists
    'display the name of each list in the Lists collection
    For i = 1 To objlists.Count
        MsgBox "The name of the list is " & objlists.Item(i).Name
    Next i

End Sub