I loop a txt file with the tipical free file, ecc.....
during the loop i fill: var1, var2, var3...varnn
i need to store into a multim dimensional array the value of var.
how to?
note:
i need to erase the array when a IF .. AND IF conition exists ... and make the array free for a new filling of data.
FILL array multi dimensional...
-
- Administrator
- Posts: 78789
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: FILL array multi dimesional...
Do you know in advance how many variables each line will contain?
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4402
- Joined: 26 Apr 2010, 17:36
Re: FILL array multi dimesional...
19 vars...HansV wrote:Do you know in advance how many variables each line will contain?
naturallly give me the example to lop the filled array
in this case i need:
for i to array
rs.addnew
....
rs..... first element of array
rs.... second element of array
rs.update
next i
-
- Administrator
- Posts: 78789
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: FILL array multi dimensional...
Why do you want to use an array? Wouldn't it be easier to populate the fields in the record directly?
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4402
- Joined: 26 Apr 2010, 17:36
Re: FILL array multi dimensional...
HansV wrote:Why do you want to use an array? Wouldn't it be easier to populate the fields in the record directly?
particular condition...
i fill the array with:
..
Dim MARRAY()
...
I = I + 1
ReDim Preserve MARRAY(0 To 18, 0 To I)
MARRAY(0, I) = a
MARRAY(1, I) = b
MARRAY(2, I) = c
MARRAY(3, I) = d
MARRAY(4, I) = e
MARRAY(5, I) = f
MARRAY(6, I) = g
MARRAY(7, I) = h
MARRAY(8, I) = i
MARRAY(9, I) = l
MARRAY(10, I) = m
MARRAY(11, I) = n
MARRAY(12, I) = o
MARRAY(13, I) = p
MARRAY(14, I) = q
MARRAY(15, I) = r
MARRAY(16, I) = s
MARRAY(17, I) = t
MARRAY(18, I) = v
here the loop of array
-
- Administrator
- Posts: 78789
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: FILL array multi dimensional...
You don't say what "particular condition" is so you haven't answered my question.
Best wishes,
Hans
Hans