Type Property

Microsoft FrontPage Visual Basic

Returns an FpListType constant that represents the type of the current list. Read-only.

FpListType can be one of these FpListType constants.
fpListTypeBasicList
fpListTypeDocumentLibrary
fpListTypeSurvey
fpListTypeDiscussion

expression.Type

expression    Required. An expression that returns one of the above objects.

ShowType property as it applies to all other objects in the Applies To list.

Returns an FpFieldType constant that represents the type of the current field. Read-only.

FpFieldType can be one of these FpFieldType constants.
fpFieldAttachments
fpFieldChoice
fpFieldComputed
fpFieldCounter
fpFieldCurrency
fpFieldDateTime
fpFieldFile
fpFieldInteger
fpFieldLookup
fpFieldMultiLine
fpFieldNumber
fpFieldRatingScale
fpFieldSingleLine
fpFieldTrueFalse
fpFieldURL

expression.Type

expression       Required. An expression that returns one of the objects as mentioned above.

Example

ShowAs it applies to the BasicList, DocumentLibrary, List, and Survey objects.

The following example displays the names of all lists in the active Web site and their associated type names. If the active Web site contains no lists, a message is displayed to the user.

Sub ViewListTypes()
'Displays the name of the list and
'its associated type

    Dim lstWebList As List
    Dim strType As String

    If Not ActiveWeb.Lists Is Nothing Then
    'Cycle through lists
        For Each lstWebList In ActiveWeb.Lists
            'add types to string
            If strType = "" Then
                strType = lstWebList.Name & " - " & _
                lstWebList.Type & vbCr
            Else
                strType = strType & lstWebList.Name & " - " & _
                lstWebList.Type & vbCr
            End If
        Next
            'Display types of all lists in the web
            MsgBox "The list types in the current web are:" _
            & vbCr & strType
       Else
           'Otherwise display message to user
           MsgBox "The current web contains no lists."
     End If

End Sub

ShowAs it applies to the ListField object.

The following example displays the names of all fields in the first list of the Lists collection and their associated type names. If the active Web site contains no lists, a message is displayed to the user.

Sub Fieldtype()
'Displays the field types of the current list

    Dim objApp As FrontPage.Application
    Dim objField As ListField
    Dim strType As String

    Set objApp = FrontPage.Application

    If Not ActiveWeb.Lists Is Nothing Then
        For Each objField In objApp.ActiveWeb.Lists.Item(0).Fields
            If strType = "" Then
                strType = objField.Name & " - " & _
                objField.Type & vbCr
            Else
                strType = strType & objField.Name & " - " & _
                objField.Type & vbCr
            End If
        Next objField
            MsgBox "The names of the fields in this list and their types are: " & _
            vbCr & strType
    Else
         'Otherwise display message to user
         MsgBox "The current Web site contains no lists."
         End If
End Sub