Link to home
Start Free TrialLog in
Avatar of ouestque
ouestqueFlag for United States of America

asked on

Excel 2003: populating column headers without using worksheets or Rowsource

How do I change column headers on an Excel 2003 listbox using JUST VBA. Not using worksheets or the listbox rowsource.

(I could assign a name to some data on a worksheet, then assign the rowsource of the listbox = the name. At which point the column headers will be the first row.)  Nonetheless, I would like to populate the column headers using strictly VBA.

i.e. I have tried the following which does not work.

me.listbox.columnheaders(1) = "Students" (Doesn't assign "Students" as the first column header.)


I have attached a sample Excel file another Experts - Exchange specialist helped me with. This file populates a listbox using VBA when the user presses "Refresh". Nonetheless, the first row of data does not show in the column header when using VBA to populate the listbox. (Maybe a way to change VBA to do this?)

Experts-Exchange-Example.xls
ASKER CERTIFIED SOLUTION
Avatar of StellanRosengren
StellanRosengren
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial