#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
tweacle
 
Posts: n/a
Default Macro problem


I need help in creating a macro that will break the link on a page, save
as and then re open the original workbook that was linked.

I have a workbook linked. Say for instance book A is linked to book B.


I am trying to create a macro that breaks the links between the 2 books
and then book B to "SAVE AS"with a different file name and then re open
it with the links that were originally there so the data in book A when
it deletes it will clear book B too.

I have a macro at the moment which is like so.


ActiveWorkbook.BreakLink Name:= _
"R:\SHARED\PASSACC\EXCEL\PASSACC\SUMMARY\MKPROC.XL S",_
Type:=xlExcelLinks
ActiveWorkbook.BreakLink Name:=
_"R:\SHARED\PASSACC\EXCEL\PASSACC\SUMMARY\MKWEEK1. XLS", _
Type:=xlExcelLinks
ActiveWorkbook.BreakLink Name:= _
"R:\SHARED\PASSACC\EXCEL\PASSACC\SUMMARY\MKWEEK2.X LS", _
Type:=xlExcelLinks
ActiveWorkbook.BreakLink Name:= _
"R:\SHARED\PASSACC\EXCEL\PASSACC\SUMMARY\MKWEEK3.X LS", _
Type:=xlExcelLinks
ActiveWorkbook.BreakLink Name:= _
"R:\SHARED\PASSACC\EXCEL\PASSACC\SUMMARY\MKWEEK4.X LS", _
Type:=xlExcelLinks
ActiveWorkbook.BreakLink Name:= _ "
“R:\SHARED\PASSACC\EXCEL\PASSACC\SUMMARY\PERIODSUM MARY.XLS”,_
Type:=xlExcelLinks

Application.ExecuteExcel4Macro ("save.as?()")

Workbooks.Open Filename:= _
"R:\SHARED\PASSACC\EXCEL\PASSACC \SUMMARY.XLS", _
UpdateLinks:=3

Any Idea's where im going wrong cos this never seems to work ok as far
as save as and re opens the workbook but dont have links there .

Many Thanks


--
tweacle
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
deleting a macro resulted in a problem militant Excel Discussion (Misc queries) 0 April 26th 05 05:21 AM
Circular Problem needs Macro NICK Excel Discussion (Misc queries) 2 February 1st 05 09:09 AM
External data Macro Problem Excel 97 Craig Kelly Excel Discussion (Misc queries) 1 January 17th 05 03:17 PM
Problem executing a macro from different workbook where it is Sergio Calleja Excel Discussion (Misc queries) 1 January 17th 05 12:38 PM
macro problem Kevin Excel Discussion (Misc queries) 1 December 14th 04 10:47 PM


All times are GMT +1. The time now is 05:59 PM.

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

About Us

"It's about Microsoft Excel"