I made some changes to the code and am now getting a different error.
The new error is Run-time error '1004' Reference is not valid
The line I added is,
ActiveWorkbook.Names.Add Name:="pc_", RefersToR1C1:="_pc!R2C11"
The line after this is the bug.
Windows("X2173.xlsx").Activate
Range("A2").Select
Cells.Find(What:="Meter ID : X2146", After:=ActiveCell, LookIn:=xlValues _
, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=True).Activate
ActiveCell.Offset(8, 0).Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Application.CutCopyMode = False
Selection.Copy
Windows("_SUBREAD.XLSM").Activate
Application.Goto Reference:="_om2"
ActiveSheet.Paste
Sheets("transf").Select
Range("A1").Select
Windows("X2173.xlsx").Activate
Range("A2").Select
Cells.Find(What:="Meter ID : X2599", After:=ActiveCell, LookIn:=xlValues _
, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=True).Activate
ActiveCell.Offset(8, 0).Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Application.CutCopyMode = False
Selection.Copy
Windows("_SUBREAD.XLSM").Activate
ActiveWorkbook.Names.Add Name:="pc_", RefersToR1C1:="_pc!R2C11"
Application.Goto Reference:="_pc"
ActiveSheet.Paste
Bookmarks