LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Collection vs. Array of Arrays, nszim

I am mostly self taught in vba, but with other programming experience.
In my app, I have a need to store character and integer variables in arrays.
To date, since the numbers are small I dim an example array as:
dim Array(10,6) as string
When I 'read' from the array I convert the 'string' numbers into integer
vars, and vice-versa when I put values into the array. It's getting to be a
pain to do this.
In reading MSoft docum in vba, I guess I could make an integer array and
a string array and 'combine' them into a holding array for transport in
called subs. e.g.
dim IntArray(x,y) as integer
dim StringAry(a,b) as string
dim master(2)
master(1)=intarray
master(2)=stringary
....
then, call mySub(inputstuff,master)
where mysub operates on the elements of master individually.

I've read a little bit about collections and that function appears to do
about the same thing as the above.
1. WHAT ARE THE BIG PRO'S AND CON'S OF COLLECTIONS VS. AN ARRAY OF
ARRAYS?

2. I've been looking for, in the "collections arena" of Excel docum. how
to
"directly" address the elements of an array that is part of a collection. I
have not found any and indeed do not know it it's even possible. In other
words,
if the collection is composed of these two arrays: and the collection is
named:
COLL,
IntArray(x,y) as integer (item 1 in COLL)
StringAry(a,b) as integer (item 2 in COLL)
IS THERE A WAY TO ADDRESS IntArray(3,4) by using the name of the
Collection? Kinda like: NewVar = COLL(1, ????) to try and grab the value
in IntArray(3,4) without using the IntArray 'name'?

Thanks.
Neal Z
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
update collection of arrays RB Smissaert Excel Programming 7 December 26th 05 09:28 AM
VSTO: Sheets collection a 1-based array(?!?!?) Bob Sullentrup Excel Programming 0 November 10th 05 04:10 PM
Writing to An Array or Collection vqthomf Excel Programming 4 August 23rd 05 02:07 PM
How to Access Array of Arrays? billbell52 Excel Programming 1 February 24th 05 06:05 PM
Array of Arrays in VBA Peter[_49_] Excel Programming 0 November 9th 04 09:50 PM


All times are GMT +1. The time now is 04:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"