+ Reply to Thread
Results 1 to 2 of 2

Code to delete filepath in linked sheet

  1. #1
    Registered User
    Join Date
    10-16-2014
    Location
    London, Ontario
    MS-Off Ver
    2010
    Posts
    14

    Code to delete filepath in linked sheet

    Hello,

    I have two workbooks that are linked and do calculations giving a result with numbers based on sheets within both workbooks. However, when i copy these workbooks the filepath remains to the original file. The folder name will change each time. I need some code to eliminate the filepath and just keep the specified link.

    It appears like this in the formula bar:

    ='C:\Users\vanderp\Desktop\Master Folder\1. Operations & Tasks\[Tasks 001-025.xlsb]001'!$AR$16

    but it needs to be this:

    ='[Tasks 001-025.xlsb]001'!$AR$16

    There are hundreds of links to different cells. If I could get some sort of code to eliminate everything between ' and [ in the formula bar that would be perfect as the links would then only recognize the workbook that is open.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,919

    Re: Code to delete filepath in linked sheet

    CTRL-H might be your friend if you want to do it manually.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

+ 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. Code to save document in designated filepath
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-02-2015, 11:24 AM
  2. [SOLVED] Making a filepath a hyperlink in an email generated with code
    By MissDB in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-17-2014, 07:33 AM
  3. VBA code not saving into FilePath
    By Keith Edgar in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-27-2014, 08:14 AM
  4. [SOLVED] Delete paste-linked row from another sheet after that sheet has been deleted
    By poptart141 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-08-2013, 12:09 PM
  5. [SOLVED] Copying files from a selected filepath to a filepath mentioned in a worksheet's cell
    By subbby in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-10-2012, 03:59 PM
  6. code for variable filepath
    By jem4614 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-19-2008, 05:15 PM
  7. Store FilePath Inside Code
    By Magnivy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-16-2006, 05:10 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