+ Reply to Thread
Results 1 to 5 of 5

Mass editing Hyperlinks

  1. #1
    Registered User
    Join Date
    07-27-2010
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    5

    Mass editing Hyperlinks

    Hello All,

    I'm currently trying to mass edit hyperlinks in an excel file that links a chemical name to the chemicals' MSDS sheet in the same folder. The file was moved to a new drive so more people could have access to it, and now I need to change the hyperlinks. However, the hyperlinks all begin with the following:

    ../../../EHS%20Share/MSDS/Chemistry%20MSDS/

    of which is followed by the chemical name. I have not be able to get any VBA macros to work and I believe it has something to do with the '../../../ at the beginning of the drive. For reference, the actual location the above is directing to is:

    O:\EHS Share\MSDS\Chemistry MSDS\

    And the new location I would like the hyperlinks to point to is:

    O:\Chemistry Share\Chemistry MSDS\2010 Chemicals\

    Any help would be greatly appreciated!
    Lividtex

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Mass editing Hyperlinks

    I *think* you can get the links to update themselves by opening BOTH files, then save the "link to" file in the new location.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Re: Mass editing Hyperlinks

    Hi,

    May be this link will help?

    http://excelribbon.tips.net/Pages/T0...yperlinks.html
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  4. #4
    Registered User
    Join Date
    07-27-2010
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Mass editing Hyperlinks

    Quote Originally Posted by JBeaucaire View Post
    I *think* you can get the links to update themselves by opening BOTH files, then save the "link to" file in the new location.
    I was wondering if you could be a little more specific? I don't quite follow where you're going with that idea.


    And oldchippy, I tried your suggestion and had the same problem. It seem that after editing the macro to contain my old file and new file I have the same problem as before that it doesn't find what I'm looking for. I set up a test with a basic hyperlink to www.google.com and had the macro supplied change all hyperlinks to www.google.com to www.yahoo.com and that works. However, the macro does not work when I copy and past the above address for each hyperlink.

  5. #5
    Registered User
    Join Date
    07-27-2010
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Mass editing Hyperlinks

    Thanks guys for the help but I figured it out a different way. I'm not sure what the ../../../ was referring to, but I used a replace macro to change that to ..\..\..\ and then used another replace macro to change the entire string I needed changed. Just for future reference!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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