Seems VB generate predefined values when use functions RND and RANDOMIZE(6.0),
here is minimal improvement which generate You really reandom value…
Original Author: Tair Abdurman
Code
'generate random value between minVal and maxVal inclusive
'or return -1 if any error
Public Function GenerateRandom(minVal As Long, maxVal As Long) As Long
intr = -1
maxVal = maxVal + 1
If maxVal > 0 Then
If minVal >= maxVal Then
minVal = 0
End If
Else
minVal = 0
maxVal = 10
End If
Randomize (DatePart("s", Now) + DatePart("m", Now))
Do While (intr < minVal Or intr = maxVal)
intr = CLng(Rnd() * maxVal)
Loop
GenerateRandom = intr
End Function