Public Function iRnd(a As Integer,b As Integer) As Integer
iRnd = Int(Rnd * (Abs(a - b) + 1)) + IIf(a >= b,b,a)
End Function
-------
两个参数:a,b 表示上限和下限,没有前后之分(a是上限或下限都行,b也一样)
Public Function iRnd(a As Integer,b As Integer) As Integer
iRnd = Int(Rnd * (Abs(a - b) + 1)) + IIf(a >= b,b,a)
End Function
-------
两个参数:a,b 表示上限和下限,没有前后之分(a是上限或下限都行,b也一样)