Part | Description | |
object | Required. A valid object. | |
Long | Optional. An integer indicating the maximum number of rows. The default value is 8. |
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 = 12
SpinButton1.Value = ComboBox1.ListRows
Label1.Caption = "ListRows = " & SpinButton1.Value
End Sub
Private Sub SpinButton1_Change()
ComboBox1.ListRows = SpinButton1.Value
Label1.Caption = "ListRows = " & SpinButton1.Value
End Sub