Why does this come up as a "Subscript out of range" error?
Note, testing this to another sheet in the original workbook works flawlessly, the problem arises when trying to do so to a second workbook.
Note, testing this to another sheet in the original workbook works flawlessly, the problem arises when trying to do so to a second workbook.
Code:
SecondFile = "C:\Users\User\Documents\File2.xlsm"
Set SelRng = ActiveCell.Offset(0, 2).Resize(3, 2)
Workbooks.Open FileName:=SecondFile
Worksheets(SecondFile).Sheets(1).Range("A4:B6").Value = SelRng.Value