VBA

Moderators: PavlinII
Number of threads: 1673
Number of posts: 3078

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Array variable and Collection object Posted by SpecialEd on 19 Dec 2010 at 9:17 AM
I have a one dimensional array variable that I would like to store 3 different values for each index of the array. The closest thing I can find in VBA Help is Collection Object, but I don't see it as working because I don't think it is structured so that there can be multiple collections based on an index. My array variable will have an index from 1 to up to maybe 2500. What else is there in VBA to handle this situation? I am using Excel. My project concerns optimizing haul patterns in relation to agricultural land grading.
Report
Re: Array variable and Collection object Posted by jga777 on 23 Dec 2010 at 3:30 PM
Hello,

If you're using a single dimensional array, you can use the following:

Dim myArray(10) as string

myArray(0) = "Value 1"
myArray(1) = "Value 2"
myArray(2) = "Value 3"

Hope this helps!
-Jaime
www.programmerssolutions.com



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.