是可以的但是我不知道怎么生成的,那个随机数的 上限和下限怎么定义啊?
Option Explicit
Private Sub Command1_Click() Static Sum As Integer Sum = Sum + 1 Dim Random As Integer Random = Int(901 * Rnd() + 100) Print Random; If Sum Mod 10 = 0 Then PrintEnd Sub
楼上的大哥谢谢了啊!
精简了哈,嘿嘿!Private Sub Command1_Click()Dim random As Integerrandom = (900 * Rnd(1) + 100)Print randomEnd Sub
Int(1000-100)*Rnd+100