Yes, but you have 20 rows in your table and so you add 20 entries to you RowArray:
FOR RN = 0 to Rows-1
RowArray.Add(RN)
NEXT
If you look at you debug messagebox
count goes from 20 to 1
and
c goes form 0 to 19
Now all of your (20) added rows are removed from the RowArray.
And now, the Sub ShufflePattern is called again (I don't know why, I haven't analysed your code yet) ... but there is no entry in th RowArray left.
specci48
EDIT:
... as ususal ... a collision with Erles post ...