+ Reply to Thread
Results 1 to 3 of 3

Using the 'Hyperlinks.Add' method for links within workbook

  1. #1
    Registered User
    Join Date
    04-07-2014
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    7

    Question Using the 'Hyperlinks.Add' method for links within workbook

    Hey all,

    To make a sort of "error log" of erroneous rows, I am using the "Hyperlinks.Add" function in a Sub to dynamically link to a Range within the Workbook. The Sub executes successfully, however, upon clicking the hyperlink, a Reference not valid error comes up. I'm unsure on how linking within a workbook works, and could use some advice/pointers. Note that I also attempted to list the address as Address:="" to no avail. Here is the code:

    Please Login or Register  to view this content.
    Thanks in Advance

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Using the 'Hyperlinks.Add' method for links within workbook

    Change ActiveWorkbook.Name to "".
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    04-07-2014
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Using the 'Hyperlinks.Add' method for links within workbook

    Ah ha, I posted too hastily. The issue here was that single quotes are needed around the worksheet's name which you are linking to. The format for the subaddress is 'WorksheetName'!RangeAddress. Don't forget single quotes! The fixed code is below.

    Please Login or Register  to view this content.
    Last edited by farfennugen; 04-15-2014 at 11:21 AM. Reason: formatting and clarity

+ 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. Convert list of text links into Hyperlinks?
    By jaustin008 in forum Excel General
    Replies: 1
    Last Post: 07-08-2012, 04:14 PM
  2. Replies: 1
    Last Post: 12-31-2011, 06:58 AM
  3. maintain hyperlinks with external links
    By nisbett in forum Excel General
    Replies: 0
    Last Post: 10-06-2011, 06:32 PM
  4. Cell that links to two possible hyperlinks?
    By djmarak in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-24-2007, 10:14 AM
  5. Replies: 1
    Last Post: 12-09-2005, 12:00 PM

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