• Managing external links (2000 / XP)

    Author
    Topic
    #421187

    I am looking for a way to override the automatic addition of the directory path to external links when a workbook is saved.

    The location of the linked workbook (linkEE) is always known to the workbook with the links (linkER). LinkEE maybe in either a a directory specified in a parameter file, or the same directory as linkER.

    The Workbook_Open event of linkER looks for linkEE, and opens and hides it, or alerts the user to its absence (only when needed).

    This works fine while the workbook locations remain static. But when the locations change it all falls apart. Typicallly this happens when a user needs to work at home on copies of workbooks from the work LAN environment, and later return them to the LAN. It would not be an issue if they knew how to change links, but they don’t, and won’t.

    Although linkER knows where linkEE is, and opens it OK, the links fail because Excel stores the directory path as part of the external link and wants to access linkEE from where it was last time linkER was saved, rather than use the one that is already open.

    Of course, both linkER and linkEE are large and complex, the links are both direct and indirect (via OFFSETs, INDIRECTs, and dynamic named ranges), and the user level is at where they will flee at a hint of “The workbook you opened contains links to… “.

    Since the location of linkEE is known, a possible workaround would be to write code to “refresh” the link directory paths during Workbook_Open. However, I’m reluctant to pursue this path pun due to the varied link types, their number (thousands), and the limited “grunt” of most user PCs. Alternatively, code in the Workbook_BeforeSave event could remove the link directory paths, but is still far from ideal.

    Anyone have a more elegant solution, with less smash ?

    Viewing 0 reply threads
    Author
    Replies
    • #956221

      I think that the only way to do this is to always keep the workbooks in the same directory. The only other thing that I could think of would be to write code to find and fix all of the links.

      • #956297

        thankyouI was afraid that might be the answer bummer .

        I’ll think about the feasibility of user training pinkelefant , while waiting a bit longer in case anyone else has an lightbulb .

        I know there’s a bunch of very clever people around here, in addition to the invaluable search facility.

        • #956424

          As a heads-up: it should work when the relative paths stay the same: if the source workbook is always in the same location relative to the location of the “target” workbook, then it should keep working. Provided you haven’t used any INDIRECT functions with complete folder information in them.

    Viewing 0 reply threads
    Reply To: Managing external links (2000 / XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: