Want to load lists of strings from an Excel file

C

cyberdude

Hi,

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 rows of
elements in an Excel worksheet first and then load the 3 rows 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 rows of elements from an Excel worksheet into array
object_list whose length may change on each occasion? Thanks.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top