Part | Description | |
object | Required. A valid object. | |
Variant | Optional. The width of the list. A value of zero makes the list as wide as the ComboBox. The default value is to make the list as wide as the text portion of the control. |
Private Sub SpinButton1_Change()
ComboBox1.ListWidth = SpinButton1.Value
Label1.Caption = "ListWidth = " & SpinButton1.Value
End Sub
Private Sub UserForm_Initialize()
Dim i As Integer
For i = 1 To 20
ComboBox1.AddItem "Choice " & (ComboBox1.ListCount + 1)
Next i
SpinButton1.Min = 0
SpinButton1.Max = 130
SpinButton1.Value = Val(ComboBox1.ListWidth)
SpinButton1.SmallChange = 5
Label1.Caption = "ListWidth = " & SpinButton1.Value
End Sub