General information
Category:
Coding, syntax & commands
Option Explicit
' you can use the combo style property to simulate a list box with the combo
'and modify its size by changing it at design time with the mouse or keyboard
'Dont forget to change the Combo1 style property like "Combo1.Style = vbComboSimple" first ok?
Private Sub Form_Load()
With Combo1
.AddItem "Some text in this first line", 0
.AddItem "Some text in this second line", 1
.AddItem "Some text in this before the last line", 2
.AddItem "Some text in this last line", 3
End With
End Sub
'however with this combo style users can still type on it,and U dont want that, ok there's another way to
'avoid users into type their own text and "force them"*(not literally talking)
' to choose from the values of the combo1, and is by setting the style property of combo1 to
'vbComboDropDownList such as Combo1.Style = vbComboDropDownList which is an option
'to the regular ListBox when you dont have much space on the form to set the info.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only