P
Philosophaie
Error:
Run-time error '1004':
Application-defined or object-defined error
Compares cells in column Z with the Random number generated to see if it has
already been generated. I think it has something to do with "m".
RandomNumber = Int(1000 * Rnd + 1)
m = .Cells(1, 27)
For k = 1 To m
If RandomNumber = .Cells(k, 26) Then
RandomNumber = Int(1000 * Rnd + 1)
End If
Next k
.Cells(m, 26) = RandomNumber
m = m + 1
.Cells(1, 27) = m
Run-time error '1004':
Application-defined or object-defined error
Compares cells in column Z with the Random number generated to see if it has
already been generated. I think it has something to do with "m".
RandomNumber = Int(1000 * Rnd + 1)
m = .Cells(1, 27)
For k = 1 To m
If RandomNumber = .Cells(k, 26) Then
RandomNumber = Int(1000 * Rnd + 1)
End If
Next k
.Cells(m, 26) = RandomNumber
m = m + 1
.Cells(1, 27) = m