Aaron is right, your counter variable would be 1 (one) more after the loop then the maximum in the loop. So, this error would accur only if you use this variable as an index after the loop, or if your array has less elements.

------------------

Serge

Software Developer
[email protected]
[email protected]
ICQ#: 51055819