Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
External link update macro
I am trying to write a macro that will open all sources of external links to
my document, save the document & then close all sources again. I have been able to do this but as soon as i add a new link the macro does not pick it up. Note: simply updating links does not work as each sheet has many items calculated off the current date & so each day they are opened they change. Any ideas? or do i need to do it manually? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
External link update macro
Consider the following "semi-automatic" approach:
Sub OpenAndClose() Dim wBook(1 To 3) As Workbook Set wBook(1) = Workbooks.Open("C:\test\alpha.xls") Set wBook(2) = Workbooks.Open("C:\test\beta.xls") Set wBook(3) = Workbooks.Open("C:\test\gamma.xls") ThisWorkbook.Save MsgBox (" ") For i = 1 To 3 wBook(i).Close Next End Sub This means maintaining a list of workbook files that are referenced. But at least the open/close is automatic. -- Gary''s Student - gsnu200908 "Ashley" wrote: I am trying to write a macro that will open all sources of external links to my document, save the document & then close all sources again. I have been able to do this but as soon as i add a new link the macro does not pick it up. Note: simply updating links does not work as each sheet has many items calculated off the current date & so each day they are opened they change. Any ideas? or do i need to do it manually? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using another .xslx file as an external source (and how to update) | Excel Discussion (Misc queries) | |||
Macro update link | Excel Worksheet Functions | |||
How to update an external excel sheet | Excel Discussion (Misc queries) | |||
How to update an external excel sheet | Excel Worksheet Functions | |||
External Links Don't Update When Using Certain Functions | Excel Discussion (Misc queries) |