Design a form in VB to find maximum or minimum value between two numbers




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

Output:


About the Author

Unknown

Author & Editor

Has laoreet percipitur ad. Vide interesset in mei, no his legimus verterem. Et nostrum imperdiet appellantur usu, mnesarchum referrentur id vim.

Post a Comment

 
My Study Voice © 2015 - Designed by Templateism | Distributed By Blogger Templates