代码如下:
Private Sub Command1_Click()
Dim a As Integer, b As Integer, c As Integer
Dim max 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
Else
max = max
End If
Label4.Caption = max
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
Else
max = max
End If
Label4.Caption = max
End Sub