Name
control
.RowSource [= setting
]
Synopsis
For ComboBox
and ListBox
controls, sets or returns the address of the range that provides values for the control. The following code adds items from A1:A5 on the Lookup worksheet as items in a listbox:
Private Sub UserForm_Initialize( ) ListBox1.RowSource = "Lookup!A1:A5" End Sub
Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.