Author |
Message |
Timo Gransc #1 / 8
|
 "Un-dim" Array
Hi there, is there any way to "un-dim" a formerly dimensioned dynamic array (that means: put it in the state that it was in before the first redim)? Thanks in advance, Timo
|
Wed, 20 Oct 2004 02:25:25 GMT |
|
 |
Jakob Bielin #2 / 8
|
 "Un-dim" Array
Quote: > Hi there, > is there any way to "un-dim" a formerly dimensioned dynamic array (that > means: put it in the state that it was in before the first redim)?
Maybe Erase does what you want. -- jb (replace y with x to reply)
|
Wed, 20 Oct 2004 01:28:44 GMT |
|
 |
Equinox Tetrachlorid #3 / 8
|
 "Un-dim" Array
Quote:
> is there any way to "un-dim" a formerly dimensioned dynamic array > (that means: put it in the state that it was in before the first redim)?
MyArray = Array() "Array(arglist) The required arglist argument is a comma-delimited list of values that are assigned to the elements of the array contained within the Variant. If no arguments are specified, an array of zero length is created." Eq. -- Equinox Tetrachloride www.cl4.org - www.insecurities.org
|
Wed, 20 Oct 2004 01:35:52 GMT |
|
 |
Frank Ad #4 / 8
|
 "Un-dim" Array
On Fri, 03 May 2002 19:25:25 +0100, Timo Gransch Quote:
>Hi there, >is there any way to "un-dim" a formerly dimensioned dynamic array (that >means: put it in the state that it was in before the first redim)?
You have to use the UnDim function.. Just kidding. ;-) Erase will kill the array dead, like it was never ReDimmed. ReDim myArray(0) is just as good in most cases. Regards, Frank
|
Wed, 20 Oct 2004 01:47:26 GMT |
|
 |
Tom Shelto #5 / 8
|
 "Un-dim" Array
Erase. Tom Shelton
Quote: > Hi there, > is there any way to "un-dim" a formerly dimensioned dynamic array (that > means: put it in the state that it was in before the first redim)? > Thanks in advance, > Timo
|
Wed, 20 Oct 2004 02:41:00 GMT |
|
 |
Duane Bozart #6 / 8
|
 "Un-dim" Array
Quote:
> Hi there, > is there any way to "un-dim" a formerly dimensioned dynamic array (that > means: put it in the state that it was in before the first redim)?
I'm trying to be prescient here, but if you're asking what I <think> you're asking, "no". If you're asking if you can recover the previous array <including> its data, that's a "no". You can save the dimensions in temporary variables and use them to ReDim the array back to where it was but if it had been modified in any way, the data are not recoverable. Here I'm really guessing--you've ReDim'ed to a smaller size with "Preserve" and now want the original, full size back? Afraid only way is to save a temporary copy of the data in that case.
|
Wed, 20 Oct 2004 03:20:44 GMT |
|
 |
Marcu #7 / 8
|
 "Un-dim" Array
simple but effective: arraytoempty = split("", ",")
Quote: > Hi there, > is there any way to "un-dim" a formerly dimensioned dynamic array (that > means: put it in the state that it was in before the first redim)? > Thanks in advance, > Timo
|
Thu, 21 Oct 2004 22:58:14 GMT |
|
 |
Joe #8 / 8
|
 "Un-dim" Array
Quote:
> simple but effective: arraytoempty = split("", ",")
This might also work in VB6: MyArray = Array() -- Joe Foster <mailto:jlfoster%40znet.com> Space Cooties! <http://www.xenu.net/> WARNING: I cannot be held responsible for the above They're coming to because my cats have apparently learned to type. take me away, ha ha!
|
Fri, 22 Oct 2004 11:02:44 GMT |
|
|