Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I reset an array to myarray()
From the On-Line Help:
Erase Statement Reinitializes the elements of fixed-size arrays and releases dynamic-array storage space. Syntax Erase arraylist The required arraylist argument is one or more comma-delimited array variables to be erased. Remarks Erase behaves differently depending on whether an array is fixed-size (ordinary) or dynamic. Erase recovers no memory for fixed-size arrays. Erase sets the elements of a fixed array as follows: Type of Array Effect of Erase on Fixed-Array Elements Fixed numeric array Sets each element to zero. Fixed string array (variable length) Sets each element to a zero-length string (""). Fixed string array (fixed length) Sets each element to zero. Fixed Variant array Sets each element to Empty. Array of user-defined types Sets each element as if it were a separate variable. Array of objects Sets each element to the special value Nothing. Erase frees the memory used by dynamic arrays. Before your program can refer to the dynamic array again, it must redeclare the array variable's dimensions using a ReDim statement. Alan Beban Dan wrote: I want to clean out a public array that I have grown dynamically and start over as if it was the first time into the code. ReDim myarray() gives an error message. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I reset an array to myarray()
Thanks you guys are all great
I looked all through the online help but was stuck on redim - never thought of erase! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I reset the tab key? | Excel Discussion (Misc queries) | |||
meaning of : IF(Switch; Average(array A, array B); array A) | Excel Worksheet Functions | |||
reset to zero | Excel Worksheet Functions | |||
Can I reset an array to myarray() | Excel Programming | |||
Redim MyArray | Excel Programming |