Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default 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   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 113
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I reset the tab key? Saeanen Excel Discussion (Misc queries) 2 May 22nd 07 04:26 PM
meaning of : IF(Switch; Average(array A, array B); array A) DXAT Excel Worksheet Functions 1 October 24th 06 06:11 PM
reset to zero baldyheed Excel Worksheet Functions 3 October 2nd 05 03:30 AM
Can I reset an array to myarray() Chip Pearson Excel Programming 0 February 20th 04 05:41 PM
Redim MyArray Peter Pantus Excel Programming 2 September 27th 03 03:37 PM


All times are GMT +1. The time now is 02:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"