[thelist] VB Scripters....
Aylard JA (James)
jaylard at equilon.com
Thu May 11 19:16:50 2000
Anthony Baratta wrote:
> I'd prefer to use an Array variable to stuff some information into, versus
a
> Dictionary Object. The problem appears to be that I can't declare an array
without
> hard coding the array size.
Anthony,
Use ReDim. Also, when you first dimension your array, don't specify
a size:
Dim varArray()
There are other limitations to this as well (such as, if you have a
multidimensional array, you can only ReDim the rightmost dimension). Also,
be sure to look into the Preserve keyword when you do a ReDim -- if you
don't use it, you lose the data your array already contains. For more info,
check out the bottom half of this page:
http://msdn.microsoft.com/scripting/VBScript/doc/vbsvariables.htm
In the end, I generally prefer JavaScript arrays, but whatcha gonna
do?
hth,
James Aylard
jaylard@equilon.com