+ Reply to Thread
Results 1 to 12 of 12

Hyperlinks are connected to spreadsheet and not desired path

  1. #1
    Registered User
    Join Date
    08-09-2016
    Location
    birmingha, england
    MS-Off Ver
    2010
    Posts
    25

    Hyperlinks are connected to spreadsheet and not desired path

    Hi there,

    I have this code:

    Please Login or Register  to view this content.
    This command is launched from a button on a userform interface. The problem is that when the hyperlink is entered into the spreadsheet and I attempt to click on it. It shows that the hyperlink is directed to the spreadsheet and not the folder path I chose.

    How to fix this? Thanks

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Hyperlinks are connected to spreadsheet and not desired path

    Removed... bad answer... I'll give a better one in a few mins.
    Last edited by Arkadi; 11-03-2016 at 08:50 AM.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Registered User
    Join Date
    08-09-2016
    Location
    birmingha, england
    MS-Off Ver
    2010
    Posts
    25

    Re: Hyperlinks are connected to spreadsheet and not desired path

    Im afraid the workbook is too large to create a duplicate version. Here is the userform interface full code:


    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    08-09-2016
    Location
    birmingha, england
    MS-Off Ver
    2010
    Posts
    25

    Re: Hyperlinks are connected to spreadsheet and not desired path

    Hi, I changed the code slightly to:

    Please Login or Register  to view this content.
    This inserts the hyperlink correctly - however it inserts it into the spreadsheet after I press OK on the file picker and not OK on the userform - How to change so it inserts into the spreadsheet only after I press OK on the userform?


    Thanks
    Last edited by sdhutty; 11-02-2016 at 10:14 AM.

  5. #5
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Hyperlinks are connected to spreadsheet and not desired path

    Please Login or Register  to view this content.

  6. #6
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Hyperlinks are connected to spreadsheet and not desired path

    Hmm.... it is because the command button1 code puts the hyperlink in... you need to move some code... let me get right back to you

  7. #7
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Hyperlinks are connected to spreadsheet and not desired path

    Ok, in the ok button code you have a whole bunch of things inside the With Worksheets("Register") section... Add this line inside that block:

    Please Login or Register  to view this content.
    Your CommandButton1_Click code would just be one line:

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    08-09-2016
    Location
    birmingha, england
    MS-Off Ver
    2010
    Posts
    25

    Re: Hyperlinks are connected to spreadsheet and not desired path

    Thank you that works perfectly!

  9. #9
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Hyperlinks are connected to spreadsheet and not desired path

    I'm glad it worked out for you

    Please remember to mark the thread as solved when you have a moment if you are satisfied.

  10. #10
    Registered User
    Join Date
    08-09-2016
    Location
    birmingha, england
    MS-Off Ver
    2010
    Posts
    25

    Re: Hyperlinks are connected to spreadsheet and not desired path

    Is it possible to change where the file picker opens from?

  11. #11
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Hyperlinks are connected to spreadsheet and not desired path

    Yes... GetFolder(ThisWorkbook.Path) goes to the path of the current workbook.... if you wanted C:\myfolder\ for example to be the default then: GetFolder("C:\myfolder\")

  12. #12
    Registered User
    Join Date
    08-09-2016
    Location
    birmingha, england
    MS-Off Ver
    2010
    Posts
    25

    Re: Hyperlinks are connected to spreadsheet and not desired path

    Thanks again

+ 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 not browsing the desired folder path to open file
    By prabhuduraraj09 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-21-2016, 03:14 AM
  2. How are the formulas connected in excel spreadsheet
    By jim1234 in forum Excel General
    Replies: 11
    Last Post: 08-13-2016, 10:01 PM
  3. Hyperlinks, file path and other spreadsheet users?
    By Lis7 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 08-06-2015, 01:29 PM
  4. File Path in UserForm connected to macros
    By 3nduranc3 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-08-2013, 09:18 AM
  5. Add a comment to an excel spreadsheet that is connected to a database?
    By rach8lsmith in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-24-2009, 03:02 PM
  6. Hyperlinks in Excel when the path changes
    By alis88 in forum Excel General
    Replies: 1
    Last Post: 08-18-2008, 08:50 AM
  7. Replies: 1
    Last Post: 12-02-2005, 05:00 AM

Tags for this Thread

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