Private Sub Command1_Click()
Dim x1 As Single, x2 As Single, x3 As Single
Dim a As Single
x1 = Val(Text1.Text)
x2 = Val(Text2.Text)
x3 = Val(Text3.Text)
Call max(x1, x2, x3, a)
Label4.Caption = "最大值是" & a
End Sub
Private Sub max(x As Single, y As Single, z As Single, maxx As Single)
maxx = x
If y > maxx Then
maxx = y
If z > maxx Then
maxx = zEnd Sub