你好,软糖帮你写了个
代码如下
Private Sub Form_Load()
Randomize
Dim k(10) As Integer
Dim max As Integer
max = 0
Dim tip As String
For i = 1 To 10
k(i) = (99 - 10 + 1) * Rnd + 10
If max < k(i) Then max = k(i)
tip = tip & Str(k(i))
If i < 10 Then tip = tip & ", "
Next
MsgBox ("随机数:" & tip & vbCrLf & "最大值:" & Str(max))
End Sub