Macro problem

T

tweacle

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.XLS",_
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.XLS", _
Type:=xlExcelLinks
ActiveWorkbook.BreakLink Name:= _
"R:\SHARED\PASSACC\EXCEL\PASSACC\SUMMARY\MKWEEK3.XLS", _
Type:=xlExcelLinks
ActiveWorkbook.BreakLink Name:= _
"R:\SHARED\PASSACC\EXCEL\PASSACC\SUMMARY\MKWEEK4.XLS", _
Type:=xlExcelLinks
ActiveWorkbook.BreakLink Name:= _ "
“R:\SHARED\PASSACC\EXCEL\PASSACC\SUMMARY\PERIODSUMMARY.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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top