+ Reply to Thread
Results 1 to 3 of 3

How to write a macro that that will re-link an excel file

  1. #1
    Registered User
    Join Date
    12-25-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    7

    How to write a macro that that will re-link an excel file

    Hi Everyone,

    Is there a way for me to write a macro that will automatically re-link (like clicking edit link under data tab) into another file.

    lets say file Y.xls is linked to xmmddyy.xls and everyday I save a new xmmddyy.xls.

    Is there a way for me to create a macro that will relink y.xls to the latest xmmddyy.xls? I'm thinking if i can write the edit link in macro and just use the today function somewhere....What do you guys think?


    Thanks!
    Carlos

  2. #2
    Registered User
    Join Date
    10-15-2013
    Location
    Hawaii
    MS-Off Ver
    Excel 2007
    Posts
    63

    Re: How to write a macro that that will re-link an excel file

    One approach would be to create a Defined Name called "ExtLink" as the external workbook name (e.g. "X072217.xls").
    Then, for example, when you make a reference to the external workbook, use =INDIRECT("'[" & ExtLink & "]Sheet1'!A1")

    Add a simple macro to update:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-25-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: How to write a macro that that will re-link an excel file

    Thanks for the help bro!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Write macro to open link and copy/paste content from website
    By snuffnchess in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-20-2016, 11:10 AM
  2. How to Write a Macro for set a expiry date for Excel 2007 File
    By jobseeker in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-26-2014, 11:07 AM
  3. How can I write a macro to import multiple text file iinto the same excel worksheet
    By pvimalmec in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-07-2013, 04:11 PM
  4. Macro: Search for a file name in a specified folder and link to excel cell
    By jr13 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-08-2013, 03:57 PM
  5. DDE link changes value, how to trigger macro to write data to another worksheet
    By Samjo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-14-2012, 03:19 PM
  6. How do you write a macro to link data between 2 worksheets?
    By liur3n in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-15-2010, 02:33 PM
  7. [SOLVED] How do I write an Excel macro to open a file using the CommonDial.
    By Lynn in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-30-2005, 10:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1