Substituted this code below:
X: For i = 0 To a.GetUpperBound(0)
t = arbit.Next(1, 99)
If Array.IndexOf(a, t) = -1 Then
a(i) = t
Else
GoTo X
End If
Next
for this one below:
While I <= 40
t = arbit.Next(1, 99)
If Array.IndexOf(a, t) = -1 Then
a(I) = t
I += 1
End If
End While
And it works just well