+ Reply to Thread
Results 1 to 4 of 4

Creating hyperlinks to network files

  1. #1
    Registered User
    Join Date
    11-25-2005
    Posts
    19

    Creating hyperlinks to network files

    I am trying to create a macro so that I can click a button and a hyperlink is created, referencing a network location where the location is dependent upon a value in another cell.

    So for example, the hyperlink to be created in cell E3 would be "=hyperlink("G:\General\Blah\Blah\"cell A9"\file.pdf")"

    Also, I want the hyperlink text to just say "ABC"

    How does this happen?

  2. #2
    Dave Peterson
    Guest

    Re: Creating hyperlinks to network files

    Maybe...

    =hyperlink("g:\general\blah\blah\" & A9 & "\file.pdf", "ABC")

    akronpow wrote:
    >
    > I am trying to create a macro so that I can click a button and a
    > hyperlink is created, referencing a network location where the location
    > is dependent upon a value in another cell.
    >
    > So for example, the hyperlink to be created in cell E3 would be
    > "=hyperlink("G:\General\Blah\Blah\"cell A9"\file.pdf")"
    >
    > Also, I want the hyperlink text to just say "ABC"
    >
    > How does this happen?
    >
    > --
    > akronpow
    > ------------------------------------------------------------------------
    > akronpow's Profile: http://www.excelforum.com/member.php...o&userid=29100
    > View this thread: http://www.excelforum.com/showthread...hreadid=488213


    --

    Dave Peterson

  3. #3
    Registered User
    Join Date
    11-25-2005
    Posts
    19
    The resulting hyperlink formula is:

    =HYPERLINK("G:\Real Estate\Shared\Offline Packages\& D5 &\PCR.PDF","PCR")

    and I need the "& D5 &" part to show the result of cell D5.

    Here is the code as used:

    Range("H9").FormulaR1C1 = _
    "=HYPERLINK(""G:\Real Estate\Shared\Offline Packages\& D5 &\PCR.PDF"",""PCR"")"

  4. #4
    Dave Peterson
    Guest

    Re: Creating hyperlinks to network files

    Ah, you're populating the cell in code.

    You may want to change the D5 to R5C4 since you're using R1C1 reference style
    (or just use .formula).

    And if you have trouble, you may need to make it look more like:

    Range("H9").Formula = _
    "=HYPERLINK(""file:////G:/Real Estate/Shared/Offline Packages/""" & _
    "&D5&""/PCR.PDF"",""PCR"")"

    akronpow wrote:
    >
    > The resulting hyperlink formula is:
    >
    > =HYPERLINK("G:\Real Estate\Shared\Offline Packages\& D5
    > &\PCR.PDF","PCR")
    >
    > and I need the "& D5 &" part to show the result of cell D5.
    >
    > Here is the code as used:
    >
    > Range("H9").FormulaR1C1 = _
    > "=HYPERLINK(""G:\Real Estate\Shared\Offline Packages\& D5
    > &\PCR.PDF"",""PCR"")"
    >
    > --
    > akronpow
    > ------------------------------------------------------------------------
    > akronpow's Profile: http://www.excelforum.com/member.php...o&userid=29100
    > View this thread: http://www.excelforum.com/showthread...hreadid=488213


    --

    Dave Peterson

+ 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