+ Reply to Thread
Results 1 to 10 of 10

An issue with setting up hyperlinks within the workbook

  1. #1
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    An issue with setting up hyperlinks within the workbook

    Hello.

    I am trying to create a hyperlink (haveing never done this in code before) between a cell in a summary tab to the actual tab in the workbook that has the same name.

    The following code executes and seems to work, that is the colour of the data in summary cell changes to hyperlink "blue" but when i attempt to execute the hyperlink by clicking in the cell i get a "Reference is not valid" error.

    If I right click on the offending cell and select the same page (edit hyperlink) the it works just fine.

    It is probably something simple, that is what normally trips me up

    jmac

    Please Login or Register  to view this content.

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: An issue with setting up hyperlinks within the workbook

    hyper_link_data is a variable, so you need to change to this. This is with me assuming that's the worksheet's name.
    Please Login or Register  to view this content.
    多么想要告诉你 我好喜欢你

  3. #3
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    Re: An issue with setting up hyperlinks within the workbook

    thanks Millz,

    a random test of one out of one shows that it now works, much appreciated, and thanks for the very speedy response

    Jmac

  4. #4
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    Re: An issue with setting up hyperlinks within the workbook

    Sorry Millz,

    further testing shows it didnt actually do what i wanted and the error continues

    hyper_link_data is actually a variable that contains the name of a tab in the current workbook, I am trying to set up links within the current workbook

    Jmac

  5. #5
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: An issue with setting up hyperlinks within the workbook

    That's weird because I just did something like that/similar and it works for me.

    Try changing to
    Please Login or Register  to view this content.


    This was what I just did. I have several cells containing sheet names, selected the cells and ran this macro.
    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    Re: An issue with setting up hyperlinks within the workbook

    tarantulas latest working-saved.xlsm
    Hi again Millz,

    Slowly, well actually very rapidly, going crazy.

    I changed my code in the create macro to use the first snippet from your last post and that seems to work OK.

    As I already have a spreadsheet with some 60+ tabs i didnt want to recreate the tabs just to get the hyperlinks so I tried to create a simple "one time" hyperlink create macro.

    In this macro I used the following code which should have done what I want, I get blue text underlined so it looks like hyperlink, error when i try to follow link

    I will add the spreadsheet as well

    Please Login or Register  to view this content.

  7. #7
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: An issue with setting up hyperlinks within the workbook

    I get why now. It's because of the names, they need to be covered in ' '

    Please Login or Register  to view this content.

  8. #8
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    Re: An issue with setting up hyperlinks within the workbook

    Thanks millz,

    that seems to work a treat (and I learnt some new stuff as well, double bonus

    jmac

  9. #9
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    Re: An issue with setting up hyperlinks within the workbook

    Thanks millz,

    that seems to work a treat (and I learnt some new stuff as well, double bonus)

    jmac

  10. #10
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    Re: An issue with setting up hyperlinks within the workbook

    and I have no idea why that reply posted twice???
    Last edited by jmac1947; 01-16-2014 at 03:09 AM. Reason: forgot to add rep star for millz

+ 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. setting up hyperlinks
    By ryan darrow in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-19-2010, 05:27 PM
  2. Macro for setting hyperlinks
    By contactamer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-10-2008, 07:52 PM
  3. Setting Hyperlinks
    By redhanz in forum Excel General
    Replies: 1
    Last Post: 11-27-2006, 03:11 PM
  4. issue with hyperlinks
    By nerdman in forum Excel General
    Replies: 1
    Last Post: 01-12-2006, 11:20 AM
  5. Setting up hyperlinks automatically
    By symean in forum Excel Formulas & Functions
    Replies: 45
    Last Post: 09-06-2005, 09:05 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