Is it possible to get rid of scroll bars in combobox? In other world I want to have a full view of all items then choosing them from combobox.
The problem is that items in combobox are quite long, so they are cutted even with scroll bars.
Is it possible to get rid of scroll bars in combobox? In other world I want to have a full view of all items then choosing them from combobox.
The problem is that items in combobox are quite long, so they are cutted even with scroll bars.
It's fine now. It was just about playing with properties of combobox and reducing number of lines to be written to the combobox's items.
Part of code:
[vba]UserForm1.Controls("ComboBox" & d).ColumnCount = 2
UserForm1.Controls("ComboBox" & d).ColumnWidths = 20
UserForm1.Controls("ComboBox" & d).ListWidth = 400
UserForm1.Controls("ComboBox" & d).ListRows = list
UserForm1.Controls("ComboBox" & d).Clear
For i = 0 To (list - 1)
If LTrim(Mylist(i, 0)) <> "" Then
UserForm1.Controls("ComboBox" & d).AddItem
UserForm1.Controls("ComboBox" & d).Column(0, i) = Mylist(i, 0)
UserForm1.Controls("ComboBox" & d).Column(1, i) = Mylist(i, 1)
Else: Exit For
End If
Next i[/vba]
But I still can't understand how to set all columns width independent since error appeard on such a code:
[vba] UserForm1.Controls("ComboBox" & d).ColumnWidths = 20; 40[/vba]
The value assigned to .ColumnWidths must be a string
[VBA]UserForm1.Controls("ComboBox" & d).ColumnWidths = "20;40"[/VBA]
He didn't know it was impossible, so he did it. (Jean Cocteau)
Oh, I'm stupid, that's quite evident! Thank you =)Originally Posted by tstav