Private Sub Command1_Click()
Dim a(10) As Single
For i = 1 To 10
a(i) = Rnd * 31 + 10
Print Format(a(i),"0.00")
Next
End Sub怎么生成在文本框里呢?所有数字都生成在文本框?嗯,生成的随机数都要在文本框。Private Sub Command1_Click() Dim a(10) As Single dim temp as string temp="" For i = 1 To 10 a(i) = Rnd * 31 + 10 temp=temp & " " & Format(a(i), "0.00") Next Text1.Text=temp End Sub