Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default "Breaklink Problem"

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default "Breaklink Problem"


I haven't used the BreakLink method.
However, reviewing BreakLink in the help file reveals that "Name" should
refer to the name of the link. Also, the LinkSources method for a workbook
returns an array of all of the link names in the workbook...
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Don" <BRNER2@AOLDOTCOM
wrote in message
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....
'-snip-
' 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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default "Breaklink Problem"

Thanks Jim...you pointed me in the right direction. I had moved the file to
a flash drive off the ops computer and was working at home off that flash
drive ("E"). My macro defined "Name" as being on "C" drive.....duhh...feel
sort of dumb now, going to go to my corner and pout....lol But the good news
is "problem solved"...:)

Thanks again and have a great weekend,

Don

"Jim Cone" wrote:


I haven't used the BreakLink method.
However, reviewing BreakLink in the help file reveals that "Name" should
refer to the name of the link. Also, the LinkSources method for a workbook
returns an array of all of the link names in the workbook...
--
Jim Cone
Portland, Oregon USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Don" <BRNER2@AOLDOTCOM
wrote in message
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....
'-snip-
' 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
problem with Linking workbooks via "copy" and "paste link" Arkitek Excel Discussion (Misc queries) 0 December 19th 06 10:03 PM
Problem: Worksheets("New Style 2006").Unprotect Password:="naPrint" Karoo News[_2_] Excel Programming 1 January 30th 06 02:40 PM
Problem with "On error resume next" with "custom VLookup" Factivator Excel Programming 3 July 20th 04 04:42 PM


All times are GMT +1. The time now is 11:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"