Howdy, Stranger!   Sign In with Facebook Sign In with Google
Sign In with OpenID    Clearing an array?  Would it be possible
for someone to help explain how to clear an array of values
currently stored in it. Would you go through the array line by
line and write = "" or would you use to ReDim statement. Any
help would be greatly appreciated.     • pseudocoderpseudocoder
Posts: 669Member ✭✭     I'm not sure how later versions of VB
handle it, but you might try the Erase function. If the array is
static, the function will clear the value of each element; if
the array is dynamic, it will destroy the elements.    •
JTB600AJTB600A Posts: 4Member     [color=Blue]ReDim[/color]
array(X)     with X being the size of your array - 1
(Programming Languages start at 0 not 1)      use a for...Next
Loop      [color=Blue]For[/color] X [color=Blue] as
integer[/color] = 0 to (Array().length - 1)     Array(X) =
[color=Blue]Nothing[/color]      [color=Blue]ReDim Preserve
[/color]Array(X)      this will Keep all values and just r