D
Don
Background...Win XP...Xcel 2002....WB1 stores data on WS "DATA", reports and
charts are generated on quarterly WS's then saved off to new individual
WB's...the link should be broken to the original WB but this is where the
program halts with this msg..
"Run-time error '1004'
Method 'Breaklink' of Object'_Workbook' Failed"
The code below....
'WB1 is the active WB at this point.."C:\************\LEADS _
'PROGRAM 2007-2008.xls"
Sheets("1ST QTR MAXIN CHART").Select 'chart is generated on this WS
ActiveWindow.SelectedSheets.PrintOut 'printed
ActiveWindow.SelectedSheets.Copy 'copied
' next the new WB is saved with it's own File Name
ActiveWorkbook.SaveAs Filename:="C:\*************\1st _
Qtr Maxin.xls" , FileFormat:=xlNormal, Password:="", _
WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False'
' and next is where I want to break the link to the original WB1
ActiveWorkbook.BreakLink Name:= "C:\************\LEADS _
PROGRAM 2007-2008.xls", Type:= xlExcelLinks
ActiveWindow.Close
Any help would be greatly appreciated,
Don
charts are generated on quarterly WS's then saved off to new individual
WB's...the link should be broken to the original WB but this is where the
program halts with this msg..
"Run-time error '1004'
Method 'Breaklink' of Object'_Workbook' Failed"
The code below....
'WB1 is the active WB at this point.."C:\************\LEADS _
'PROGRAM 2007-2008.xls"
Sheets("1ST QTR MAXIN CHART").Select 'chart is generated on this WS
ActiveWindow.SelectedSheets.PrintOut 'printed
ActiveWindow.SelectedSheets.Copy 'copied
' next the new WB is saved with it's own File Name
ActiveWorkbook.SaveAs Filename:="C:\*************\1st _
Qtr Maxin.xls" , FileFormat:=xlNormal, Password:="", _
WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False'
' and next is where I want to break the link to the original WB1
ActiveWorkbook.BreakLink Name:= "C:\************\LEADS _
PROGRAM 2007-2008.xls", Type:= xlExcelLinks
ActiveWindow.Close
Any help would be greatly appreciated,
Don