I want to do a loop, processing against a set of variables, all of the same type. I think I could put the set of variables into a range and read them from there, but didn't want to add a bunch of ranges. I'd like to do it something like described below, but haven't found a close enough reference or sample for the syntax.
What I need to accomplish:
Process Var1
Process Var2
Process Var3
Process Var4
How I'd like to do it:
Dim myVariable as Integer
For Each myVariable In (Var1,Var2,Var3,Var4)
Process myVariable
Next myVariable
------------
I thought perhaps I could do it like this:
Sub Process (myVariable as Integer)
Process myVariable
End Sub
Call Process (Var1)
Call Process (Var2)
Call Process (Var3)
Call Process (Var4)
What I need to accomplish:
Process Var1
Process Var2
Process Var3
Process Var4
How I'd like to do it:
Dim myVariable as Integer
For Each myVariable In (Var1,Var2,Var3,Var4)
Process myVariable
Next myVariable
------------
I thought perhaps I could do it like this:
Sub Process (myVariable as Integer)
Process myVariable
End Sub
Call Process (Var1)
Call Process (Var2)
Call Process (Var3)
Call Process (Var4)