I'm using a UserForm in Excel VBA and I have a combo box with style fmStyleDropDownList. I want to remove the horizontal scrollbar:
Keep in mind that this problem is somewhat similar to this one: Remove the scroll bar on a list box. In this post, the accepted solution states:
This can occur when you have the column width format property of the listbox set to something wide, then you size the control to the data, it will show the scroll bars.
To fix this, change the "Column Width" property under the format tab to something really small, then play around with this property and the size of the listbox control until you get it how you want, and no scroll bars are displayed.
So what I did is: I changed the ColumnWidths property to smaller values until the horizontal scroll bar disappears. However, this has the side effect that the drop down text has not enough width to be displayed as a whole as it is shown in the following Pictures (the Width and LastWidth property remain at 162):
Any ideas how to solve this?
As Siddharth Rout pointed out, the problem was due to multiple columns. Setting the ColumnCount property back to 1 solves this issue.