Option Explicit
Dim num1, num2 As Integer
Private Sub Command1_Click()
If Val(Text1.Text) > Val(Text2.Text) Then
MsgBox ("Num 1 is Maximum")
Else
MsgBox "Num2 is Maximum"
End If
End Sub
Private Sub Command2_Click()
If Val(Text1.Text) < Val(Text2.Text) Then
MsgBox ("Num 1 is Minimum")
Else
MsgBox "Num2 is Minimum"
End If
End Sub
Post a Comment