Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
deleting a macro resulted in a problem | Excel Discussion (Misc queries) | |||
Circular Problem needs Macro | Excel Discussion (Misc queries) | |||
External data Macro Problem Excel 97 | Excel Discussion (Misc queries) | |||
Problem executing a macro from different workbook where it is | Excel Discussion (Misc queries) | |||
macro problem | Excel Discussion (Misc queries) |