View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Massive Array needed....in code

Jason,
The concept of displaying 400K values to a user is inherently wrong.
Devise some other means of them getting to the desired value.

As for all the values; unless there is algorithm that can generate them. you
will need to store them, either in a text file or database.

A little explanation may help.

Nick

"jasonsweeney"
wrote in message
news:jasonsweeney.1uo4qb_1125558322.1142@excelforu m-nospam.com...

Ultimately, I need a user to be able to select one out of 406,396
individual values, probably out of a list box (if they can hold that
many lines??) on a userform.

The values are each unique -- an ID number

My first thought was to simply plug all 406,396 values into a massive
array:
myarray = (1,2,...406,396). Using a loop code, I prepared my numbers
to be dumped into an array with line continuations after every 11th
value like this:


"107894,107896,107901,107902,107905,107908,107909, 107910,107913,107915,10791
7
_"


There are 36,945 lines like the above. I quickly leaned that Excel
permits a maximum of 25 line continuations...

Ideas? Any reccomendations generally about handling such large amounts
of data would be appreciated. I would prefer NOT to dump these numbers
in an actual worksheet. That is, if it is possible, I would like to
have the numbers "in" the VBA code itself...by means of an array? a
collection?

-- Jason


--
jasonsweeney
------------------------------------------------------------------------
jasonsweeney's Profile:

http://www.excelforum.com/member.php...fo&userid=5222
View this thread: http://www.excelforum.com/showthread...hreadid=401043