Link to home
Start Free TrialLog in
Avatar of James Elliott
James ElliottFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Excel listbox with headers

Hi All,

Excel 2007

I have a listbox on a userform that I'm populating by looping through a recordset.

Because this is excel and not access, I cannot set the rowsource of the listbox to anything other than a range, and so I'm currently not seeing any headers.

Does anyone know of a way around this programmatically? I'm not particularly enthusiastic about creating a temporary area / range for my recordset just so that it can be a rowsource.

Thanks

Rgds
ASKER CERTIFIED SOLUTION
Avatar of Rory Archibald
Rory Archibald
Flag of United Kingdom of Great Britain and Northern Ireland 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
SOLUTION
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
You can write the recordset data directly into cells and refer the range into the listbox rowsource. No loop needed.

Kris
Please ignore my above post, I haven't fully read your question :(

Kris
Avatar of James Elliott

ASKER

Sorry for the delay.