F
ForestRamsey
I'm working on a spreadsheet where I need to find out how many entries I'll
need, then create sequentially-named variables for each of them in a VBA
subroutine.
(For example, I may need 0-6 variables. If I find out I need 3 variables,
then VariableCount = 3 and I'll want to name the variables Variable1,
Variable2 and Variable3.) This means that I want to Dim the variables then
fill them in. I feel comfortable with figuring out how to do that part...my
question is much simpler.
What is the syntax for appending a variable value onto the end of a variable
name to create a sequence of variables? I've tried a number of things, and
none have worked. I'm probably missing something basic yet again.
need, then create sequentially-named variables for each of them in a VBA
subroutine.
(For example, I may need 0-6 variables. If I find out I need 3 variables,
then VariableCount = 3 and I'll want to name the variables Variable1,
Variable2 and Variable3.) This means that I want to Dim the variables then
fill them in. I feel comfortable with figuring out how to do that part...my
question is much simpler.
What is the syntax for appending a variable value onto the end of a variable
name to create a sequence of variables? I've tried a number of things, and
none have worked. I'm probably missing something basic yet again.