Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
clearing arrays
This newsgroup has been a big help. Thanks. I have one
more question. I'm just beginning to use arrays. I read one record in a spreadsheet, and if it meets certain conditions, an array is populated. The array is then written somewhere else. We go to the next record and look for certain conditions. If we find it, we need to populat the array again. However, there may be fewer or more items in the array each time. How do I clear an array so that it is empty when i go to the next record. thanks for the help |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
clearing arrays
Mike,
Here's an example ReDim aryMe(UBound(aryMe, 1)) -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "mike" wrote in message ... This newsgroup has been a big help. Thanks. I have one more question. I'm just beginning to use arrays. I read one record in a spreadsheet, and if it meets certain conditions, an array is populated. The array is then written somewhere else. We go to the next record and look for certain conditions. If we find it, we need to populat the array again. However, there may be fewer or more items in the array each time. How do I clear an array so that it is empty when i go to the next record. thanks for the help |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
clearing arrays
Be sure to declare the array as a dynamic array; then you can simply
ReDim it, e.g. Dim arr() ReDim arr(5, 3) 'Load arr and write it to somewhere else Erase arr 'This is optional, to be used if it's desirable 'to free memory before arr is used again ReDim arr(7, 5) 'Load array and write it to somewhere Alan Beban mike wrote: This newsgroup has been a big help. Thanks. I have one more question. I'm just beginning to use arrays. I read one record in a spreadsheet, and if it meets certain conditions, an array is populated. The array is then written somewhere else. We go to the next record and look for certain conditions. If we find it, we need to populat the array again. However, there may be fewer or more items in the array each time. How do I clear an array so that it is empty when i go to the next record. thanks for the help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Clearing cells without clearing formulas | Excel Discussion (Misc queries) | |||
Clearing formulations | Excel Discussion (Misc queries) | |||
Clearing a cell | Excel Discussion (Misc queries) | |||
Clearing #N/A's in one go? | Excel Worksheet Functions | |||
Clearing #VALUE | Excel Worksheet Functions |