+ Reply to Thread
Results 1 to 4 of 4

macro code to edit address name of hyperlinked file

  1. #1
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    macro code to edit address name of hyperlinked file

    I noticed recently that when i hyperlink files to an excel sheet excel tends to leave out a good portion of the hyperlink address limiting the hyperlink to only be accessible through the workbook in use, hence if this hyperlink were copied into a different workbook it will not work on that other workbook.
    I saw somewhere online that if i add "C:" to the "Hyperlink Base", which is found under file/info, all new hyperlinks created will display full address. This works great for me moving forward but how will i fix the large range of existing hyperlinks that still use the old system?
    I decided to resolve this with a macro code that will loop though all the data and only focus on the hyperlinked cell, then it will add the full filename to the existing filepath of the hyperlink.
    Below is a code pieced together from various snippets:
    Please Login or Register  to view this content.
    The problem i am having is i've noticed that the abbreviated version of the hyperlink is preceded by "..", i believe that this should be omitted by the code if i want the hyperlink to work since i am adding more string text to the hyperlink address.
    Any ideas on how to add the aforementioned to the code?
    Thanks
    Last edited by kosherboy; 01-21-2016 at 11:04 AM.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: macro code to edit address name of hyperlinked file

    Try this...


    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Re: macro code to edit address name of hyperlinked file

    Thanks for the revised code AlphaFrog Worked like a charm!
    Best regards,
    Kosherboy

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: macro code to edit address name of hyperlinked file

    You're welcome. Thanks for the feedback.

+ 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. Unable to edit macro recording code to be a relative code.
    By holaitsme in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-02-2014, 10:51 AM
  2. Copy, edit and save workbook to same location as source data file, not macro file.
    By Jasonhouse in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-02-2014, 09:01 AM
  3. Need help with a macro to pull data from excel file in hyperlinked cell
    By ai11 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-29-2013, 08:29 AM
  4. [SOLVED] VBA code edit to play wav file - simple answer probably
    By ExcelFailure in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-13-2013, 11:09 PM
  5. Automatically Email Excel Sheet to Hyperlinked Address After Data Entry
    By Hillster in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-15-2012, 01:12 PM
  6. Edit Text file import code
    By bryanbak3 in forum Excel General
    Replies: 1
    Last Post: 04-09-2012, 02:56 PM
  7. Edit An HTML Hyperlink Address To Current File Name
    By WJO in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-14-2012, 04:55 PM

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