That's what I have and all it gives me is 0 and 1Code:Randomize
A = Rnd(9)
B = Rnd(9)
C = Rnd(9)
D = Rnd(9)
E = Rnd(9)
F = Rnd(9)
G = Rnd(9)
H = Rnd(9)
DoEvents
Printable View
That's what I have and all it gives me is 0 and 1Code:Randomize
A = Rnd(9)
B = Rnd(9)
C = Rnd(9)
D = Rnd(9)
E = Rnd(9)
F = Rnd(9)
G = Rnd(9)
H = Rnd(9)
DoEvents
There ya go, hope that helpsCode:Randomize(now())
A = int(Rnd *9)+1
B = int(Rnd *9)+1
C = int(Rnd *9)+1
D = int(Rnd *9)+1
E = int(Rnd *9)+1
F = int(Rnd *9)+1
G = int(Rnd *9)+1
H = int(Rnd *9)+1
DoEvents
Plain old Randomize will work for your first statement.
True true, I just like giving it a seed that isn't necessarily the same each time a random number is needed :) heh
You may find this code a little more efficient.All the best.Code:Dim iArray(7) As Integer
Dim iTemp As Integer
Randomize
For iTemp = LBound(iArray) To UBound(iArray)
iArray(iTemp) = Int(Rnd * 9) + 1
Next