in this piece of my code...
Set wb = Workbooks.Open("Q:....xlsm")
wb.Worksheets("MasterList").Range("I" & (Range("StProj").Offset(j, 0).Value) + 1).Copy
There is something not right.
The first line (Open) works fine, but once I get to the second line I get error 1004: range of object failed. I am pretty sure I know why this is happening but I don't know how to fix it.
Range("StProj") is in the first workbook, not the the one I am opening. So when I open the Q drive workbook it can't find this StProj range. To get around this I have been trying to set Range("StProj").Offset(j, 0).Value as a variable but I cannot seem to dimension it so that the code is happy.
Help!
Set wb = Workbooks.Open("Q:....xlsm")
wb.Worksheets("MasterList").Range("I" & (Range("StProj").Offset(j, 0).Value) + 1).Copy
There is something not right.
The first line (Open) works fine, but once I get to the second line I get error 1004: range of object failed. I am pretty sure I know why this is happening but I don't know how to fix it.
Range("StProj") is in the first workbook, not the the one I am opening. So when I open the Q drive workbook it can't find this StProj range. To get around this I have been trying to set Range("StProj").Offset(j, 0).Value as a variable but I cannot seem to dimension it so that the code is happy.
Help!