SoFunction
Updated on 2025-04-08

VBS generates non-repeat random number codes [0-10]


dim Z(10),i
for i=0 to 10
Z(I)=GetRnd(i-1)
(Z(i))
NEXT

Function GetRnd(n)
Dim i,X
Randomize
X=CInt(10*Rnd() )
For i=0 To n
If X=Z(i) Then
X=GetRnd(n)
Exit For
End If
Next
GetRnd=X
End Function