RemoveChoice Method

       

Removes the specified choice from the current field.

expression.RemoveChoice(Index)

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

Index  Required. A Long that represents the name of the choice or its position within the array.

Example

The following example removes the first choice from the NewChoiceField field in the first list of the active web.

Sub RemoveChoice()
'Removes first choice from array

    Dim objApp As FrontPage.Application
    Dim objListFields As listFields
    Dim objListField As ListFieldChoice

    Set objApp = FrontPage.Application
    Set objListFields = objApp.ActiveWeb.Lists.Item(0).Fields
    Set objListField = objListFields.Item("NewChoiceField")
    'Remove first choice in list
    objListField.RemoveChoice Index:=0

End Sub