Hallo!
So I have a variable, NumToGen (Integer); I want to create multiple text strings based on NumToGen
So for example,
Dim Header(1 To NumToGen) As String
However, when I attempt to do this, it insists that NumToGen must be a constant; I know a constant cannot be based upon a variable as constants are defined when the macro compiles. Is the situation the same with defining variables?
Any solution to this? I mean, I could theoretically:
Dim Header (1 to 100) As String
and then only actually refer to the variables Header(1 to NumToGen) when I'm coding - for example, via a loop as so:
For iTemp = 1 To NumToGen
     Header(iTemp) = "Marmalade is such a fabulous food item. In fact, " & Range("A" & x + iTemp).Value & " agrees with me!"
Next iTemp
But this means I have a bunch of defined variables floating around which are useless and it seems a bit inefficient.
Any suggestions?
Thanks!
Lady Marmalade