You cannot use the ActiveCell
of a different workbook without specifying so.
Try :
With sh2
.Range(.ActiveCell.Offset(0, 1), .ActiveCell.Offset(0, 3)).Copy
End With
EDIT:
I didn't try the above code, in case it doesn't work, try to replace :
sh2.Range("A7").Select
sh2.Range(ActiveCell.Offset(0, 1), ActiveCell.Offset(0, 3)).Copy
with :
sh2.Range(sh2.Range("A7").Offset(0, 1), sh2.Range("A7").Offset(0, 3)).Copy
EDIT2 :
Also note that the .Copy
method has a Destination
parameter, which can be in a different workbook. Read the MSDN Range.Copy Method Reference.