Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns a ListEntries collection that represents all the items in a DropDown object.
Syntax
expression. ListEntries
expression An expression that returns a 'DropDown' object.
Remarks
For information about returning a single member of a collection, see Returning an object from a collection.
Example
This example retrieves the text of the active item from the drop-down form field named "DropDown1."
Set myField = ActiveDocument.FormFields("DropDown1").DropDown
num = myField.Value
myName = myField.ListEntries(num).Name
This example retrieves the total number of items in the active drop-down form field (the document should be protected for forms). If there are two or more items, this example sets the second item as the active item.
Set myField = Selection.FormFields(1)
If myfield.Type = wdFieldFormDropDown Then
num = myField.DropDown.ListEntries.Count
If num >= 2 Then myField.DropDown.Value = 2
End If
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.