• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1243
  • Last Modified:

Can I Format Column Headings in Listbox on Excel User Form?

I have a lsit box on a user form which has the row source set to a range in a worksheet. No problem getting the column headings to appera, but I want to know if it is possible to format the column headings as they are small and don't stand out enough. I have used labels above the list box, but if there is a lot of data in the columns then the box may scroll to the right which will obviously take the columns out of alingment with the labels. I suspect this may not be possible, but can I make the headings bold or change the colour?
0
Karl_mark
Asked:
Karl_mark
3 Solutions
 
Arno KosterCommented:
Sure,

when you go to the userform in the vba editor and select the listbox, you can edit  the properties.

to make the list contents bold : click on the font entry in the properties window, press the button with the "..." on it.
Now select appropriate font and bold conditions.

The colour can be changed using the "ForeColor" property
0
 
Rory ArchibaldCommented:
No - you can't change just the headers. The best you get is the dividing line.
0
 
2toriaCommented:
You would probably be better off using a ListView Control, which gives you a lot more flexibility in  presenting your data.  Listview controls don't allow customisation of the headers without API calls, but they do stand out more than they do in the Listbox control.

It does require some VBA experience to populate a Listview, but in terms of flexibility and customisation I'd say it's well worth learning how to use.

HTH,
Matt
0
 
Karl_markAuthor Commented:
Thanks guys. I don't have time to change it to ListView right now, but may take a look once I get this finished.
0
 
TracyVBA DeveloperCommented:
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now