Where do you set $Count initially? Also, you probably have to REDIM PRESERVE it each time you try to increase the size.