Solved

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

Posted on 2011-03-10
6
931 Views
Last Modified: 2012-08-13
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
Comment
Question by:Karl_mark
6 Comments
 
LVL 19

Assisted Solution

by:akoster
akoster earned 166 total points
ID: 35093532
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
 
LVL 85

Assisted Solution

by:Rory Archibald
Rory Archibald earned 166 total points
ID: 35093547
No - you can't change just the headers. The best you get is the dividing line.
0
 
LVL 8

Accepted Solution

by:
2toria earned 168 total points
ID: 35094090
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
 

Author Comment

by:Karl_mark
ID: 35130368
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
 
LVL 24

Expert Comment

by:broomee9
ID: 35360836
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now