Hi there. I'm applying this function in Access 2010 so I've added the question to the Office Development thread even though it may apply elsewhere.

I have some code.

It splits some strings and feeds the results into a database table using the split function.
When I loop through the data I re-use the same name for the array, eg. splitstring = split(mystring,",")

Should I be erasing the splitstring array after every loop iteration? or does the re-use of the same array name automatically redim the array?

Reason I ask is after I get through some 2000+ iterations the code starts slowing down and I am wondering whether it's due to incrasing memory usage (through non-erasure of arrays) or it's just the strings I'm splitting?

Hope that made sense.

Cheers