Function Max(a As Integer, b As Integer)
If a > b Then
Max = a
Else
Max = b
End If
End Function
Private Sub Command1_Click()
Dim a As Integer
Dim b As Integer
Dim c As Integer
a = Val(Text1.Text)
b = Val(Text2.Text)
c = Val(Text3.Text)
Print Max(Max(a, b), c)
End Sub
If a > b Then
Max = a
Else
Max = b
End If
End Function
Private Sub Command1_Click()
Dim a As Integer
Dim b As Integer
Dim c As Integer
a = Val(Text1.Text)
b = Val(Text2.Text)
c = Val(Text3.Text)
Print Max(Max(a, b), c)
End Sub