Set an array to zero

T

T.Mad

Hi all,
How can I set an array to zero without looping to every element? For example
in FORTRAN with a single assignment e.g. Array=0 you can do that. Is there a
similar way in vba?
Many thanks
 
J

Jacob Skaria

Dim NumArray(10) As Integer ' Integer array.
Erase NumArray ' Each element set to 0.

If this post helps click Yes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top