View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Jim Rech Jim Rech is offline
external usenet poster
 
Posts: 2,718
Default Fastest way to reset to zero an array

but to reset it to zero (or whatever is the initial value)

That's exactly what the Erase statement does to an array. From Help:

"Reinitializes the elements of fixed-size arrays and releases dynamic-array
storage space."


--
Jim
"Charles" wrote in message
s.com...
| Sorry, I meant a VBA array. And I don't want to "delete" the array to
| free up memory but to reset it to zero (or whatever is the initial
| value) in order to work again with a clean array. Which seems to be
| what "erase" does. There seems to be different opinions on this
| newsgroup! Would you say "erase" or a loop going through every single
| component of the array is faster?
|
| Charles
|