Article ID: 211899 - Last Review: October 11, 2006 - Revision: 3.3 XL2000: Problems Setting Column Headings in ListBox ControlThis article was previously published under Q211899 SYMPTOMS
If you set the RowSource property of a ListBox control to a range of cells on a worksheet, the column headings in the list box may not be the values in the first row of your data. For example, the column headings in the ListBox control may be "Column A" and "Column B" (without the quotation marks).
CAUSE
This behavior can occur if all of the following conditions are true:
RESOLUTION
To have the labels appear as column labels in a ListBox control, set the RowSource property of the ListBox control to the range of cells that is beneath the labels. See the "More Information" section for a sample UserForm that demonstrates this behavior.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. MORE INFORMATION
To set the properties of a ListBox control so that the first row of data is used for the column labels in the list box, follow these steps:
NOTE: If you set the RowSource property to "Sheet1!A1:B5" (without the quotation marks), and then run the UserForm, the data in A1 and B1 is a selectable row in the list box, and the column headings are "Column A" and "Column B," respectively. REFERENCESFor more information about the ListBox control, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type things you can do with a multicolumn listbox or combobox in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
| Article Translations
|
Back to the top
