List property (Microsoft Forms)
Returns or sets the list entries of a ListBox or ComboBox.
Syntax
object. List(row, column) [= Variant ]
The List property syntax has these parts:
Part | Description |
---|---|
object | Required. A valid object. |
row | Required. An integer with a range from 0 to one less than the number of entries in the list. |
column | Required. An integer with a range from 0 to one less than the number of columns. |
Variant | Optional. The contents of the specified entry in the ListBox or ComboBox. |
Settings
Row and column numbering begins with zero. That is, the row number of the first row in the list is zero; the column number of the first column is zero. The number of the second row or column is 1, and so on.
Remarks
The List property works with the ListCount and ListIndex properties. Use List to access list items. A list is a variant array; each item in the list has a row number and a column number.
Initially, ComboBox and ListBox contain an empty list.
Note
To specify items you want to display in a ComboBox or ListBox, use the AddItem method. To remove items, use the RemoveItem method.
Use List to copy an entire two-dimensional array of values to a control. Use AddItem to load a one-dimensional array or to load an individual element.
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.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기