This should normally work and I guess the problem would be with the "activecell" syntax, which creates problems since I refer to another workbook.
Any idea how to fix this so it works? Googled several questions, but didn't find this specific problem. It keeps returning '1004' error, Method 'Range' of object'_Wokrsheet' failed
Thanks
Any idea how to fix this so it works? Googled several questions, but didn't find this specific problem. It keeps returning '1004' error, Method 'Range' of object'_Wokrsheet' failed
Thanks
Code:
Dim WS as Worksheet
Dim DataRange as Range
Set WS = Workbook(name).Sheets(name)
Set DataRange = Range(Range("A2"), ActiveCell.SpecialCells(xlLastCell))
DataRange. select