Click to See Complete Forum and Search --> : Dynamic Array


October 20th, 1999, 10:05 AM
Trying to create a dynamic array that gets resized based on user input and does NOT lose previous data. Think I know how to do this using PRESERVE, but not sure where to place the code. My form contains a label giving instructions, a text box for input and a command button for displaying the contents of the array.

Any suggestions/help would be appreciated by this beginner.

Lothar Haensler
October 20th, 1999, 10:11 AM
in your form module

option explicit
dim arr() as string
dim i as integer
sub Command1_click()
redim Preserve arr(i) as string
arr(i) = valueFromTextBox
i = i+ 1
end sub