返回或设置 String 类型的值,该值代表与列表相关联的表单的相对 URL。该站点表单包含与列表相关联的用户界面。可读写。
expression.DisplayForm
expression 必选。返回“应用于”列表中的对象之一的表达式。
下列示例显示活动站点中所有列表的名称以及与其相关联的站点表单的相对 URL。
Sub ViewFormURL()
'Displays the URL of the form
'associated with the list
    Dim lstWebList As List
    Dim strURL As String
    If Not ActiveWeb.Lists Is Nothing Then
        'Cycle through lists and add URLs to string
        For Each lstWebList In ActiveWeb.Lists
            If strURL = "" Then
                strURL = lstWebList.Name & "  -  " & _
                lstWebList.DisplayForm & vbCr
            Else
                strURL = strURL & lstWebList.Name & "  -  " & _
                lstWebList.DisplayForm & vbCr
            End If
        Next
        'Display URLs of all forms in web
        MsgBox "The relative URLs of the forms are:" _
               & vbCr & vbCr & strURL
    Else
        'Otherwise display message to user
        MsgBox "The current web contains no lists."
    End If
End Sub