Option Explicit Private IncrementValue As Integer Private Const Interval1 As Integer = 800 Private Const Interval2 As Integer = 200 Private Const Interval3 As Integer = 55 Private Sub Form_Load() IncrementValue = 0 Me.LabelValue = 100 Me.Command1(0).Caption = "Up" Me.Command1(1).Caption = "Down" End Sub Private Sub Command1_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single) Increment Choose(Index + 1, 1, -1) '+1 または -1 Timer1.Interval = Interval1 Timer1.Enabled = True IncrementValue = Choose(Index + 1, 10, -10) '+10 または -10 End Sub Private Sub Command1_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single) IncrementValue = 0 End Sub Private Sub Timer1_Timer() Static Counter As Integer If IncrementValue = 0 Then Counter = 0 Timer1.Enabled = False Exit Sub End If Counter = Counter + 1 If Counter < 10 Then Timer1.Interval = Interval2 Else Counter = 10 Timer1.Interval = Interval3 End If Increment IncrementValue End Sub Private Sub Increment(ByVal Value As Integer) Me.LabelValue = Me.LabelValue + Value End Sub Public Property Get LabelValue() As Integer LabelValue = CInt(Val(Label1.Caption)) End Property Public Property Let LabelValue(ByVal Value As Integer) Label1.Caption = CStr(Value) End Property