[CODE]Private Sub Command1_Click()
    '33,42,17,68,9,12
    Dim Mat(1 To 6) As Integer    '//定义数组.
    '//给数组各元素赋值.
    Mat(1) = 33: Mat(2) = 42
    Mat(3) = 17: Mat(4) = 68
    Mat(5) = 9: Mat(6) = 12    
    Dim i As Integer
    Dim iMax As Integer    
    iMax = Mat(1)      '假设第一个是最大的.
    For i = 2 To 6         '//循环跟第一个数比较
        If (Mat(i) > iMax) Then
            '//如果第i个大于iMax的话.            
            iMax = Mat(i)     '//就将这个数赋给iMax
        End If
    Next    
    Print iMax     '//输出最大的数
End Sub[/CODE]