|
-
Mar 10th, 2008, 04:17 AM
#1
Thread Starter
New Member
problem with arrays
Hey all
I have a trouble. In my form, there is a button, which executes such code when clicked on:
Code:
If i = 0 Then
ReDim rarx(0), rary(0), rarz(0) As Long
ReDim stri(0) As String
End If
If i >= 1 Then
ReDim Preserve rarx(i)
ReDim Preserve rary(i)
ReDim Preserve rarz(i)
ReDim Preserve stri(i)
End If
i = i + 1
And then it gives values to rarx(i), rary(i), rarz(i), stri(i), which are too complex to post here, but are certainly correctly written. After, it has to write me values of all the existing arrays' members using 'Do Until...Loop' and displaying them row by row.
The question is, when i click on the button for a few times, it only posts the latter ('i') members, whereas all the earlier ones seem to be erased.
The arrays are not mentioned anywhere else in code, and they are only dimensioned with this very 'ReDim' statement above.
I'd be very glad if you'd help me out )
Last edited by kapsz; Mar 10th, 2008 at 04:22 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|