Option Explicit Dim tora As Integer Private Sub Command1_Click() tora = 1 Timer1.Enabled = True End Sub Private Sub Command2_Click() tora = 2 Timer1.Enabled = True End Sub Private Sub Command3_Click() tora = 3 Timer1.Enabled = True End Sub Private Sub Command4_Click() tora = 4 Timer1.Enabled = True End Sub Private Sub Timer1_Timer() Select Case tora Case 1 Label1.Caption = Val(Label1.Caption) + 1 Case 2 Label2.Caption = Val(Label2.Caption) + 1 Case 3 Label3.Caption = Val(Label3.Caption) + 1 Case 4 Label4.Caption = Val(Label4.Caption) + 1 End Select End Sub
Select Case
If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)