Martin_King
Board Regular
- Joined
- Jan 20, 2009
- Messages
- 153
Hi,
I'm working on a project and was wondering: Is there a way to have a list of variables, each string, and then loop through them as an array
e.g.
I've looked around and can't find something like this. I can loop through arrays of sheets, workbooks, ranges, etc but thats as I know what to put after "For Each" (e.g. sh, cell, etc)
Anyone ever used something similair?
Thanks,
Martin
I'm working on a project and was wondering: Is there a way to have a list of variables, each string, and then loop through them as an array
e.g.
Code:
Dim Cat, Dog, Mouse as string
For each String in array(Cat, Dog, Mouse)
...code
Next String
I've looked around and can't find something like this. I can loop through arrays of sheets, workbooks, ranges, etc but thats as I know what to put after "For Each" (e.g. sh, cell, etc)
Anyone ever used something similair?
Thanks,
Martin