Dim e As Integer
Dim b As String
e = Random(1, 57)
For counter = 1 To e
b = Random(1, 1000)
b = b Mod 53
Next
If (b = 0) Then b = Random(1, 43)
and the function is....
Function Random(ByVal Lowerbound As Long, ByVal Upperbound As Long)
Randomize()
Random = Int(Rnd * Upperbound) + Lowerbound
End Function

New Topic/Question
Reply




MultiQuote





|