I have the below partial code that is giving me the run-timer error 1004 Method 'ChangeLink' of object '_Workbook' failed. I have verified that both files are in the paths that they need to be.
Sub Link()
Dim curmonth As String
Dim oldmonth As String
Dim curfile As String
Dim oldfile As String
Application.Goto Reference:="export_area"
Selection.ClearContents
Range("FA42").Select
ActiveCell.FormulaR1C1 = _
"=R[-35]C[-156]&INDEX(R[-31]C[-156]:R[-18]C[-156],R[6]C[1]+1,1)"
Range("FA42").Select
Let curmonth = ActiveCell.Value
Range("FA44").Select
Let oldmonth = ActiveCell.Value
Let curfile = curmonth & "/REMIT.xls"
Let oldfile = oldmonth & "/REMIT.xls"
ChDir curmonth
ActiveWorkbook.ChangeLink Name:= _
oldfile, NewName:= _
curfile, Type:=xlExcelLinks
Sub Link()
Dim curmonth As String
Dim oldmonth As String
Dim curfile As String
Dim oldfile As String
Application.Goto Reference:="export_area"
Selection.ClearContents
Range("FA42").Select
ActiveCell.FormulaR1C1 = _
"=R[-35]C[-156]&INDEX(R[-31]C[-156]:R[-18]C[-156],R[6]C[1]+1,1)"
Range("FA42").Select
Let curmonth = ActiveCell.Value
Range("FA44").Select
Let oldmonth = ActiveCell.Value
Let curfile = curmonth & "/REMIT.xls"
Let oldfile = oldmonth & "/REMIT.xls"
ChDir curmonth
ActiveWorkbook.ChangeLink Name:= _
oldfile, NewName:= _
curfile, Type:=xlExcelLinks