How to add data to "ColumnHeads" in Excel VB ListBox ?

sam_d1

Board Regular
Joined
Mar 17, 2002
Messages
50
Hi all,

I have a ListBox on a UserForm in an Excel VB Project.
One of the properties of ListBox is "ColumnHeads". When I make this 'True', add data to the list and run, I get a box in the first row of the list.

As expected this box remains even when I scroll down the list.

But I am not able add any data to this first row. Even the first data I add (to the list) is displayed from the second row.

Can someone help me to add data to the "ColumnHead" ?

Note : I am using
"MicroSoft Forms 2.0 ListBox", (MF20.DLL)
not the "ListView"

Thanks in Advance
- sam
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
I've only used this option using "real" ranges from Excel, not adding the items on the fly... I don't know if you could add titles on the fly....
 
Upvote 0
Hi sam

To have ColumnHeads included you must exclude your firt row in the RowSource Property. For example if your data table is "A1:K1000" you MUST use: "A2:K1000" to have row 1 as your ColumnHeads.
 
Upvote 0
Hi Juan Pablo & Dave Hawley,

This is GREAT....

I am amazed by the speed...

Thank you very much
- sam
 
Upvote 0
Re: How to add data to "ColumnHeads" in Excel VB ListBox ?

Thanks, I learned a simple solution after an intense search on the www. Thank You!:biggrin:
 
Upvote 0

Forum statistics

Threads
1,213,551
Messages
6,114,266
Members
448,558
Latest member
aivin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top