UserForm ListBox without horizontal scroll bars

pbt

Well-known Member
Joined
Oct 18, 2005
Messages
1,613
How do you get rid or the horizontal scroll bar on a UserForm ListBox?

My ListBox is populated with just 2 letter abbreviations. It shows the scroll bar at the bottom which is not required with such a small width list.

I have tried adjusting some of the fields in the ListBox Properties with no luck. Searched the subject with no luck either.

Is there a way for the scroll bars not to show in this case?
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Have you tried changing the ColumnWidths property?
 
Upvote 0
Currently that Property is Blank.

Should there be something there, and if so what should that be.

I did play around with the Width Property (is that not the property to set the width of the ListBox?)
 
Upvote 0
Currently that Property is Blank.

Should there be something there, and if so what should that be.
The scrollbars means the width of the ListBox is narrow than the default size of a column (the control has no way of knowing your text does not, or will not ever, fill out to fill the default column width. I do not know off the top of my head what that default is, but I made ListBox 31.5 (scrollbars appeared) and then set the ColumnWidths property to 10 and the scroll bars disappeared. So, my suggestion is to experiment with different values in that property.
 
Upvote 0
So, my suggestion is to experiment with different values in that property.

Your suggestion and Norie's point solves the problem.

I too was experimenting and determined that the ColumnWidth Property has to be at least 3 pts smaller then the Width Property.

The one thing that is still foggy for me is; where is it told to the programmer that this ColumnWidth property needs to be set for this type of situation? Is it available in a Help file/subject?
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,447
Members
448,966
Latest member
DannyC96

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top