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 an Array of String values that contains the choices offered to the user by the ListLookUp, ChoiceMulti, and Choice data types of the DefaultValue property. Read-only Variant.
Syntax
expression.Choices
expression A variable that represents a ListDataFormat object.
Remarks
In Microsoft Excel, you cannot set any of the properties associated with the ListDataFormat object. However, you can set these properties by modifying the list on the server that is running Microsoft SharePoint Foundation.
Example
The following example displays the setting of the Choices property for the third column in a list that is linked to a SharePoint list. In this example, it is assumed that the DefaultValue property has been set to the Choice, ChoiceMulti, or ListLookup data type.
Sub PrintChoices()
Dim wrksht As Worksheet
Dim objListCol As ListColumn
Set wrksht = ActiveWorkbook.Worksheets("Sheet1")
Set objListCol = wrksht.ListObjects(1).ListColumns(3)
Debug.Print objListCol.ListDataFormat.Choices
End Sub
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.