Sie sind auf Seite 1von 2

Aubrenica Rose Pauline T.

Lopez IV-Maxwell
Activity 2-Maximum
Description: It allows to determine the minimum number.
Private Sub cmdSmallest_Click()
Dim Value1 As Long, Value2 As Long, Value3 As Long
Value1 = txtOne.Text
Value2 = txtTwo.Text
Value3 = txtThree.Text
Call Maximum(Value1, Value2, Value3)
End Sub

Private Sub Maximum(min As Long, num2 As Long, num3 As Long)

If num2 < min Then
min = num2
End If
If num3 < min Then
min = num3
End If
Label4.Caption = " Greatest Value is " & min
End Sub
Object Name Caption
Textbox txtOne
Textbox txtTwo
Textbox txtThree
Label Label1 Enter the first value
Label Label2 Enter the second value
Label Label3 Enter the third value
Label Label4
Command Button cmdGreatest Greatest
Checked and Evaluated by:
Sir Ed Christian B. Cantos