G
Guest
I was wondering if there is a way to create variables programmically. I know
the following code isn't correct, but hopefully it will help demonstrate what
i am trying to do. I want to go through a list, that will have different
numbers of items in it each time (which is why i can't just create a defined
number of variables) and create a variable for each item, that i can use
someplace else. Specifically i want to be able to copy things from one
workbook to the next without having to declare a variable for each item
manually.
In the code below, is there a way to change the "Variable.i" variable name
to actually become Variable1, Variable2, etc.....
thanks for you help
Sub CreateVariables
Dim i as Integer
For i = 1 to 15
Dim Variable.i as integer
Variable.i = Cells(i,1).value
Next i
End Sub
the following code isn't correct, but hopefully it will help demonstrate what
i am trying to do. I want to go through a list, that will have different
numbers of items in it each time (which is why i can't just create a defined
number of variables) and create a variable for each item, that i can use
someplace else. Specifically i want to be able to copy things from one
workbook to the next without having to declare a variable for each item
manually.
In the code below, is there a way to change the "Variable.i" variable name
to actually become Variable1, Variable2, etc.....
thanks for you help
Sub CreateVariables
Dim i as Integer
For i = 1 to 15
Dim Variable.i as integer
Variable.i = Cells(i,1).value
Next i
End Sub