Private Sub Command5_Click()
Dim a, b, result As Double
a = Text1.Text
b = Text2.Text
Select Case opt
Case "+"
result = Val(a) + Val(b)
Case "-"
result = Val(a) - Val(b)
Case "*"
result = Val(a) * Val(b)
Case "/"
result = Val(a) / Val(b)
End Select
Text3.Text = result
End Sub