Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Column Headings for a Listbox

Status
Not open for further replies.

TheDrParker

Programmer
Nov 21, 2001
55
US
I figured out how to make the headings (columnheads) for a listbox show up, but I can't figure out how to fill in the column headings.

Thanx
Dr. Parkenstein
 
I have been trying to do the same. For everyone's benifit, it should be noted that we are talking about the MSForms (VBA) ListBox and not the VB intrinsic listbox.

It looks like it can only be populated from Excel or Access. Here is the technote from Microsoft (Q164343).

OFF97: Cannot Implement ListBox, ComboBox Control ColumnHeads Property

--------------------------------------------------------------------------------
The information in this article applies to:

Microsoft PowerPoint 97 for Windows
Microsoft Word 97 for Windows
Microsoft Outlook 97
Microsoft Outlook 98

--------------------------------------------------------------------------------

SYMPTOMS
When you set the ColumnHeads property for a ListBox control or a ComboBox control to True , column headings are displayed. However, there is no method for populating the column headings with values, for the products that are listed at the beginning of this article.

CAUSE
You must use the ColumnHeads property with the ListFillRange , Control Source , or Row Source properties to populate the headings. These properties are not available in the products that are listed at the beginning of this article.

STATUS
Microsoft has confirmed this to be a problem in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION
The ColumnHeads property works with the ListFillRange property, which is available in Excel, or the Control Source and Row Source properties, which are available in Access. When you use the ListFillRange property in Excel, you can specify a range of values that automatically populate a ListBox or ComboBox control. When you set the value of the ColumnHeads properties to True , each column in the ListBox or ComboBox control contains a heading for the relative column in the range.

For example, in Excel, if the ListFillRange property value is A1:C4 , the value of the ColumnCount property is 3, and the value of the ColumnHeads property is True , the column headings are the following:

Column A | Column B | Column C
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top