Problem with led matrix array

Thanks for doing that, I can see now what is happening.
What I can't make sense of is that code with that schematic, I don't think they match. It is not the way to drive a matrix anyway.
This link shows you what you need to do:-
http://www.thebox.myzen.co.uk/Workshop/LED_Matrix.html