Breaking up an array into parts

  • Thread starter Thread starter Maury Markowitz
  • Start date Start date
M

Maury Markowitz

I have an array of strings that is fed into an external function in a
COM. I've found that the code inside has a "break point" where too
many strings suddenly makes it run much slower (memory problem?). If
you call the code with batches of strings it runs much faster.

So how do I do this? I have a "securities(0 to records -1)", and I
want to break that down into chunks of no more than 50 at a time. The
last array cannot have any empty cells at the end.

I thought of using a comma-delimited string of everything in
"securities" and then using Split, but that would always return the
first 50 strings, without some string manipulation anyway.

Maury
 
So, what is the problem then with passing the first 50 array elements, then
the second 50 array elements etc.,
adjusting for the last lot of elements? You could pass them in a 50 element
array, again adjusting for the last bit.

RBS
 
Back
Top