I am trying to use a For Next loop for populating cells in a
spreasheet from an alreday defined array. K(17)
I have three Worsheets in my file config, report, Sheet3.
My problem is that, although I activate the sheet "report" the values
of the array (K17) are written to the spreadsheet "config".
I also changed the code as follows.
Sheets("report").Range(Cells(1, d), Cells(1, d)).value=K(d) OR
Worksheets("report").Range(Cells(1, d), Cells(1, d)).value=K(d)
however that generate a run-tem error (Application-defined or object-
defined error).
d = 1
For co = 1 To 17
Worksheets("report").Activate
Range(Cells(1, d), Cells(1, d)).value = K(d)
d = d + 1
Next co