I am trying to say the following
for each "value" in "this array"
do this
next for
I am unsure how to select a single value out of an array using a for each loop.
Note:
the array holds a group of string values
Sample data:
href=, scr=,...
I am trying to say the following
for each "value" in "this array"
do this
next for
I am unsure how to select a single value out of an array using a for each loop.
Note:
the array holds a group of string values
Sample data:
href=, scr=,...
This what you mean?
![]()
Please Login or Register to view this content.
Is it possible to use this type of loop for a multi-dim array?
for each x in array(a:a, b:b, c:c...)
do this
next x
If you're using ranges:
![]()
Please Login or Register to view this content.
Thanks for the quick reply, but how do I pick apart the array?
or![]()
Please Login or Register to view this content.
and if I declare the string in the code, what do I use as seperaters?![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
Last edited by VBA Noob; 10-19-2007 at 06:31 PM.
What is your array exactly? An explanation of what it is you're trying to accomplish might also be helpful.
Please read forum rules & wrap your VBA code
A thread with the rules is available at the top of each forum or see links below
If you do not understand the VBA code wrap instructions have a look at my last reply in this thread
http://www.excelforum.com/showthread.php?t=583950
Please Read Forum Rules Before Posting
Wrap VBA code by selecting the code and clicking the # icon or Read This
How To Cross Post politely
Top Excel links for beginners to Experts
If you are pleased with a member's answer then use the Scales icon to rate it
If my reply has assistedor failed to assist you
I welcome your Feedback.
Here is the code I am currently using
My problem is with this section![]()
Please Login or Register to view this content.
I am looking to use the first value as the folder name from outlook and the second name in place of "Test" as the download location. I can do this with a for loop and copy of the values in a sheet, but I would like this all hidden in a macro that I can lock and prevent changes by those pesky people who want to get into everything, hense the desire for a for each loop with a multi-dim array.![]()
Please Login or Register to view this content.
NOTE: The sample above only has one run worth of values within it.
Here are some ways to manipulate arrays. Obviously you can use something other than "Activecell.offset" to determine the value, I just used this example so as to, hopefully, be easier to understand what the macro is doing.![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks