C
cyberdude
Hi,
In one of my previous posts, I asked people to help me on the
following:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
I need to work on a multi-dimensional string-type array in VBA. Let
me call it object_list and assume that it has 3 dimensions for the
time being.
Therefore, I'll declare it as
Dim object_list(n, n, n) as string
where n is the length of one of the dimensions.
Now, the tricky thing is that elements of object_list need to be
updated frequently, either about the number of elements in a
dimension
or content of the elements themselves. To facilitate this kind of
updating, I plan to place and do all the editing of the 3 columns of
elements in an Excel worksheet first and then load the 3 columns of
elements into array object_list. The elements are supposed to be put
into columns A, B and C in an Excel worksheet. For each action of
this kind, the number of elements for each dimension, that is n, may
vary. So, may I ask how to achieve the above by writing a VBA macro
to load the 3 columns of elements from an Excel worksheet into array
object_list whose length may change on each occasion? Thanks.
I think the above task may be too difficult that I have received no
response so far.
Now, I am changing my strategy. I would put the 3 columns of data in
a table
in a Word document and treat this Word document as the data source.
Let me call this document "DocA". Would the task become easier after
the change? The last unsolved problem now is how to write the VBA
code to open "DocA" containing the 3-column table, read the data
inside the 3-column table and put the data into array object_list
which is inside another Word document, say "DocB". Your help will be
much appreciated. Thanks.
Mike
In one of my previous posts, I asked people to help me on the
following:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
I need to work on a multi-dimensional string-type array in VBA. Let
me call it object_list and assume that it has 3 dimensions for the
time being.
Therefore, I'll declare it as
Dim object_list(n, n, n) as string
where n is the length of one of the dimensions.
Now, the tricky thing is that elements of object_list need to be
updated frequently, either about the number of elements in a
dimension
or content of the elements themselves. To facilitate this kind of
updating, I plan to place and do all the editing of the 3 columns of
elements in an Excel worksheet first and then load the 3 columns of
elements into array object_list. The elements are supposed to be put
into columns A, B and C in an Excel worksheet. For each action of
this kind, the number of elements for each dimension, that is n, may
vary. So, may I ask how to achieve the above by writing a VBA macro
to load the 3 columns of elements from an Excel worksheet into array
object_list whose length may change on each occasion? Thanks.
I think the above task may be too difficult that I have received no
response so far.
Now, I am changing my strategy. I would put the 3 columns of data in
a table
in a Word document and treat this Word document as the data source.
Let me call this document "DocA". Would the task become easier after
the change? The last unsolved problem now is how to write the VBA
code to open "DocA" containing the 3-column table, read the data
inside the 3-column table and put the data into array object_list
which is inside another Word document, say "DocB". Your help will be
much appreciated. Thanks.
Mike