ListFieldNumber Object


Contains information about how numbers are displayed in Microsoft FrontPage list fields. The ListFieldNumber object allows you to configure the way in which you view numbers in FrontPage lists.
This object is supported only by Web pages or sites that are based on Microsoft SharePoint Services.
Using the ListFieldNumber object
Use ListFields.Item (index), where index is the name or ordinal position of a field of type fpFieldNumber, to return a single ListFieldNumber object.
Use the ListFields.Add method to add a field of type fpFieldNumber to the ListFields collection. The following example adds a new field named Total of type fpFieldNumber to the ListFields collection. The subroutine displays the name of the new field and the name of the list to which it was added.
Use the ListFieldNumber object's DisplayFormat property to change the way in which the data will be displayed in the field.
Sub CreateNumberField()
'Add new MultiLine Field
Dim objApp As FrontPage.Application
Dim objLstFlds As ListFields
Dim strName As String
Set objApp = FrontPage.Application
Set objLstFlds = objApp.ActiveWeb.Lists.Item(0).Fields
strName = "Total"
'Add new Field of type fpFieldNumber to list
objLstFlds.Add Name:=strName, Description:="Numeric Total Field", _
Fieldtype:=fpFieldNumber
MsgBox "A new field named " & strName & " was added to the list " & _
objApp.ActiveWeb.Lists.Item(0).Name & "."
End Sub