Q
Quido
Hello, I'd like to use a macro defining range names in a workbook. For the
purpose of creating the range formula, I make use of a string variable, like
this:
....
Dim RANGE As String
For Each ROW In ROWS
RANGE = RANGE & "MySheet!$" & COLUMN & "$" & ROW & ","
Next
.....
It seems to me there must be an overflow in the variable RANGE, since the
name is then not defined correctly if the ROWS array has more than say 20
elements.
MY QUESTION: Is a string variable in VBA limited to 255 characters? Or is
there any way to declare a string variable longer than that, by explicitly
stating its lenght, e.g. 500 characters?
Thanks in advance
purpose of creating the range formula, I make use of a string variable, like
this:
....
Dim RANGE As String
For Each ROW In ROWS
RANGE = RANGE & "MySheet!$" & COLUMN & "$" & ROW & ","
Next
.....
It seems to me there must be an overflow in the variable RANGE, since the
name is then not defined correctly if the ROWS array has more than say 20
elements.
MY QUESTION: Is a string variable in VBA limited to 255 characters? Or is
there any way to declare a string variable longer than that, by explicitly
stating its lenght, e.g. 500 characters?
Thanks in advance