I am having trouble referencing a range in an inactive worksheet to feed an vba array. this is the following vba code that does not work:
temparray = Sheets("Raw_Data").Range(Cells(5, 1), Cells(4 + max, LCnum * 6 + 3))
The error I get is:
Run-time error '1004'
Application-defined or object-defined error
It will work if I activate the sheet but I'm trying to avoid that. The code that will work but trying to avoid is:
Sheets("Raw_Data").Activate
temparray = Sheets("Raw_Data").Range(Cells(5, 1), Cells(4 + max, LCnum * 6 + 3))
Bookmarks