+ Reply to Thread
Results 1 to 5 of 5

Relative Hyperlink Problem

  1. #1
    Forum Contributor
    Join Date
    04-27-2006
    Location
    Cayman Islands
    Posts
    379

    Relative Hyperlink Problem

    I have a macro, that includes the following line:

    Please Login or Register  to view this content.
    However when the macro runs for some reason it adds a path in that I do not want, and the cell results in the following:

    =IF(ISNA(IF(A6="""","""",VLOOKUP(A6,'U:\DOCUMENTS\[MasterStaffList.xlsx]Staff'!$A:$J,9,FALSE))),0,IF(A6="""","""",VLOOKUP(A6,'U:\DOCUMENTS\[MasterStaffList.xlsx]Staff'!$A:$J,9,FALSE)))[/CODE]

    Anyone know why? And how to stop it? I'd like the hyperlink to be relative and not absolute.
    Last edited by ChrisMattock; 01-19-2016 at 05:40 AM.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Relative Hyperlink Problem

    If the source workbook is not in open then excel will show the actual root path of that workbook in your formula's.

    If you keep the source workbook in open then you won't get that root path.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Contributor
    Join Date
    04-27-2006
    Location
    Cayman Islands
    Posts
    379

    Re: Relative Hyperlink Problem

    Oh wow - that worked. Thanks! But is there a work around?

    I have numerous MasterStaffList.xlsx files, each for a different month, and always want the files to refer to the MasterStaffList.xlsx ffile present in that particular folder.

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Relative Hyperlink Problem

    Press Alt+E+K (or Data>>Edit Links) which will get you the Edit Links Dialogue box. Click Change Source button and locate your desired file.

  5. #5
    Forum Contributor
    Join Date
    04-27-2006
    Location
    Cayman Islands
    Posts
    379

    Re: Relative Hyperlink Problem

    OK - but in the code where I ask that cell to be populated (a LOT of sheets), there is no way to just enter the cell as I have typed it? It seems crazy my code is being overridden unless I have the file open when I run the macro.

+ 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. Relative Hyperlink References
    By mojo249 in forum Excel General
    Replies: 6
    Last Post: 07-22-2011, 06:29 AM
  2. Excel 2007 : Relative Reference Problem
    By AdAstraGames in forum Excel General
    Replies: 0
    Last Post: 07-03-2009, 02:23 AM
  3. problem with relative range name in VBA
    By jimredfield in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-26-2008, 05:20 PM
  4. relative hyperlink to cell
    By IanJ in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-15-2008, 10:56 AM
  5. Relative hyperlink
    By Ruatha in forum Excel General
    Replies: 0
    Last Post: 09-22-2006, 11:18 AM
  6. Hyperlink- relative reference
    By jjbf22 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-27-2006, 10:20 AM
  7. Force *relative* path in Insert Hyperlink dialog
    By Mark Tangard in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-17-2005, 11:06 AM
  8. [SOLVED] Force relative (unprefixed!) paths in Insert Hyperlink dialog
    By Mark Tangard in forum Excel General
    Replies: 0
    Last Post: 01-06-2005, 12:06 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