ListFieldTrueFalse |
Contains information about the Boolean true/false field in a Microsoft FrontPage list. The ListFieldTrueFalse object allows you to provide the user with a simple, binary user-interface option.
The following example creates a new field of type fpFieldTrueFalse named Default Page. The subroutine displays the name of the new field and the name of the list to which it was added.
Sub CreateTrueFalseField()
'Add new TrueFalse 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 = "Default Page"
'Add new Field of type fpFieldTrueFalse to list
objLstFlds.Add Name:=strName, Description:="Determines if this is " & _
"default page", Fieldtype:=fpFieldTrueFalse
MsgBox "A new field named " & strName & " was added to the list " & _
objApp.ActiveWeb.Lists.Item(0).Name & "."
End Sub