Solved

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

Posted on 2011-03-10
6
970 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
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 Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

773 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