Dim a As Double
Dim b As Double
Private Sub Command1_Click()
Label1.Caption = a & "1"
a = Label1.Caption
If a = 1 Then
Label1.Caption = "1"
End If
End Sub
Private Sub Command2_Click()
Label1.Caption = a & "2"
a = Label1.Caption
If a = 2 Then
Label1.Caption = "2"
End If
End Sub
Private Sub Command3_Click()
Label1.Caption = a & "3"
a = Label1.Caption
If a = 3 Then
Label1.Caption = "3"
End If
End Sub
Private Sub Command4_Click()
Label3.Caption = Val(a) + Val(b)
End Sub
Private Sub Command5_Click()
Label3.Caption = Val(a) * Val(b)
End Sub
Private Sub Command6_Click()
Label2.Caption = b & "1"
b = Label2.Caption
If b = 1 Then
Label2.Caption = "1"
End If
End Sub
Private Sub Command7_Click()
Label2.Caption = b & "2"
b = Label2.Caption
If b = 2 Then
Label2.Caption = "2"
End If
End Sub
Private Sub Command8_Click()
Label2.Caption = b & "3"
b = Label2.Caption
If b = 3 Then
Label2.Caption = "3"
End If
End Sub
|