Ricardo Caicedo
New Member
- Joined
- Aug 21, 2014
- Messages
- 43
Hello Forum</SPAN>
I got a subscript 9 error for the declaration down here, (columns and NextRow is a Long), strVarNames is a range that I previously created (Dynamic array) and it basically could contains the column string name i.e. “Q” or “R” as I need to pass the column location in the spreadsheet to be fill with a value from the array x()</SPAN>
The part that is failing is :
For j = 3 To Columns</SPAN>
Cells(NextRow, strVarNames(j)).Value = x(j)</SPAN>
Next j</SPAN>
So for example if I got in the strVarNames(3)= "</SPAN>N"</SPAN> , NextRow = 51 then I need to allocate the value of x(1) to the cell (51,N)</SPAN>
Any suggestion, I already expend too much time try to solve this problem, but I got the same problem</SPAN>
I got a subscript 9 error for the declaration down here, (columns and NextRow is a Long), strVarNames is a range that I previously created (Dynamic array) and it basically could contains the column string name i.e. “Q” or “R” as I need to pass the column location in the spreadsheet to be fill with a value from the array x()</SPAN>
The part that is failing is :
For j = 3 To Columns</SPAN>
Cells(NextRow, strVarNames(j)).Value = x(j)</SPAN>
Next j</SPAN>
So for example if I got in the strVarNames(3)= "</SPAN>N"</SPAN> , NextRow = 51 then I need to allocate the value of x(1) to the cell (51,N)</SPAN>
Any suggestion, I already expend too much time try to solve this problem, but I got the same problem</SPAN>