Part | Description | |
object | Required. A valid object. | |
Long | Optional. The delay, in milliseconds, between events. |
Dim EventCount As Long
Private Sub ResetControl()
ListBox1.Clear
EventCount = 0
SpinButton1.Value = 5000
End Sub
Private Sub UserForm_Initialize()
SpinButton1.Min = 0
SpinButton1.Max = 10000
ResetControl
SpinButton1.Delay = 50
OptionButton1.Caption = "50 millisecond delay"
OptionButton2.Caption = "250 millisecond delay"
OptionButton1.Value = True
End Sub
Private Sub OptionButton1_Click()
SpinButton1.Delay = 50
ResetControl
End Sub
Private Sub OptionButton2_Click()
SpinButton1.Delay = 250
ResetControl
End Sub
Private Sub SpinButton1_SpinDown()
EventCount = EventCount + 1
ListBox1.AddItem EventCount
End Sub
Private Sub SpinButton1_SpinUp()
EventCount = EventCount + 1
ListBox1.AddItem EventCount
End Sub