J
Joe Bannister
Hi all,
I know i've asked questions before about ChangeLink but
can anyone tell me why the following code is debugging at
the ChangLink statement?
Sheets("APR(4)").Select
Dim thisyear As String
thisyear = "C:\headoffice\"
thisyear = thisyear & "52_"
thisyear = thisyear & CStr(Range("D5").Text)
thisyear = thisyear & "_prestonweekly.xls"
Range("AA1").Select
Selection.Copy
Range("D5").Select
Selection.PasteSpecial Paste:=xlValue,
Operation:=xlAdd, SkipBlanks:=False, Transpose:=False
Dim nextyear As String
nextyear = "C:\headoffice\"
nextyear = nextyear & "01_"
nextyear = nextyear & CStr(Range("D5").Text)
nextyear = nextyear & "_prestonweekly.xls"
Sheets("MAR(4)").Select
Range("F34:V41").Select
Selection.Copy
Sheets("APR(4)").Select
Range("F10").Select
Selection.PasteSpecial Paste:=xlPasteFormulas,
Operation:=xlNone, SkipBlanks:=False, Transpose:=False
ActiveWorkbook.ChangeLink thisyear, nextyear,
Type:=xlExcelLinks
Any help greatly appreciated.
Cheers
Joe
I know i've asked questions before about ChangeLink but
can anyone tell me why the following code is debugging at
the ChangLink statement?
Sheets("APR(4)").Select
Dim thisyear As String
thisyear = "C:\headoffice\"
thisyear = thisyear & "52_"
thisyear = thisyear & CStr(Range("D5").Text)
thisyear = thisyear & "_prestonweekly.xls"
Range("AA1").Select
Selection.Copy
Range("D5").Select
Selection.PasteSpecial Paste:=xlValue,
Operation:=xlAdd, SkipBlanks:=False, Transpose:=False
Dim nextyear As String
nextyear = "C:\headoffice\"
nextyear = nextyear & "01_"
nextyear = nextyear & CStr(Range("D5").Text)
nextyear = nextyear & "_prestonweekly.xls"
Sheets("MAR(4)").Select
Range("F34:V41").Select
Selection.Copy
Sheets("APR(4)").Select
Range("F10").Select
Selection.PasteSpecial Paste:=xlPasteFormulas,
Operation:=xlNone, SkipBlanks:=False, Transpose:=False
ActiveWorkbook.ChangeLink thisyear, nextyear,
Type:=xlExcelLinks
Any help greatly appreciated.
Cheers
Joe