Hi rodchar
use "redim preserve".
Beware that this can be inefficient. If you are having to do it frequently,
use a System.collection type such as arraylist.
http://msdn.microsoft.com/library/de...ClassTopic.asp
But back to redim:
The following example from microsoft.com:
http://msdn.microsoft.com/library/de...vastmReDim.asp
Dim I, MyArray() As Integer ' Declare variable and array variable.
ReDim MyArray(5) ' Allocate 6 elements.
For I = 0 To UBound(MyArray)
MyArray(I) = I ' Initialize array.
Next IThe next statement resizes the array without saving the contents of
the elements.
ReDim MyArray(10) ' Resize to 11 elements.
For I = 0 To UBound(MyArray)
MyArray(I) = I ' Initialize array.
Next IThe following statement resizes the array but saves the contents of
the elements.
ReDim Preserve MyArray(15) ' Resize to 16 elements.
"rodchar" <ro*****@discussions.microsoft.com> wrote in message
news:7C**********************************@microsof t.com...
Hey all,
How do I add an element to an already populated array?
dim myary() as string
thanks,
rodchar