Looping with Variables

L

L.A. Lawyer

I have a series of items (variables) which need the same work done on them.
These are not in any pre-existing group, but merely a bunch of variables I
am creating, e.g., "address", "name", "assignment", etc.

I was thinking of using "For Each" but that seems to be limited to
pre-existing sets of items. I presume that I can set up some sort of array
to deal with this but I don't have a clue how to do this.
 
J

Jezebel

You can't do work 'on' a variable ... what are you trying to do?

You can use For...each if you put your items into a collection.
 
M

Malcolm Smith

*From:* "L.A. Lawyer" <[email protected]>
*Date:* Tue, 9 Jan 2007 14:13:50 -0800

I have a series of items (variables) which need the same work done on
them.
These are not in any pre-existing group, but merely a bunch of
variables I
am creating, e.g., "address", "name", "assignment", etc.

I was thinking of using "For Each" but that seems to be limited to
pre-existing sets of items. I presume that I can set up some sort of
array
to deal with this but I don't have a clue how to do this.


Why not call a function or subroutine with the variable as an argument?

- Malc
 

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