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