I have a Range variable and a separate workbook which I try to fill with values. I use TheRange for it, first setting it to the range of clientsColl.Count rows and 1000 columns.
Dim TheRange As Range
With resultWorkbook.Worksheets("matrix_random")
Set TheRange = _
.Range(Cells(2, 2), Cells(clientsColl.Count, _
1000)))
...
End With
However, I keep getting this error, can't figure out why..
Application-defined or object-defined error
.for theCells, try.Range(.Cells(2, 2), .Cells(1000, clientsColl.Count))), and you have theRowsandColumnsswitched in the secondCellsclientsColl?