+ Reply to Thread
Results 1 to 8 of 8

.Hyperlinks.Add Error Midway through Routine

  1. #1
    Registered User
    Join Date
    01-15-2018
    Location
    Midwest
    MS-Off Ver
    Office 365
    Posts
    55

    .Hyperlinks.Add Error Midway through Routine

    Hello, I have been staring at this code for over a day now and cannot figure out why it works great for over 60K times and then it throws an error when I get to the 60K+ iteration.

    I am running a routine that is performing quality control checks on a data set that is over 600,000 cells. It checks various things, and when it finds an error it writes the error to the sheet that is logging errors. One of the things it does is writes a hyperlink to the cell where the data was found.

    It gets through almost all of 3865 rows of data being inspected and then it fails on very last column of the data set (column 175). See below image.

    QC Report Fail Point.PNG

    The error I am getting is: "1004 | Application-defined or object-defined error"

    I have isolated the error to the following code area:

    Please Login or Register  to view this content.
    I have checked the variables and they are all defined and present. When it gets to this point the .hyperlinks.add portion throws the above-noted error.

    The data being evaluated is no different at the point it fails then a hundred other cells it evaluates perfectly fine. see below image.

    QC Report Fail Point - Source Data.PNG

    I appreciate the help. I have run out of ideas to try to resolve the error.
    Last edited by learning new things; 10-31-2018 at 02:53 PM. Reason: spelling error correction

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: .Hyperlinks.Add Error Midway through Routine

    There is an intrinsic limit of 66,530 hyperlinks allowed in one worksheet. Do you know how many you have inserted by the time it fails?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    01-15-2018
    Location
    Midwest
    MS-Off Ver
    Office 365
    Posts
    55

    Re: .Hyperlinks.Add Error Midway through Routine

    Jeff,

    That is my problem! Do you know of any work arounds?

    It is failing on the 66531 th hyperlink. For hours I thought I had variable integer problem, but could not find it. Now I know it was with the limit you mention above. Now I have to try to find a way to work around the limitation! Your insight, advise, guidance is much appreciated!
    Last edited by learning new things; 10-25-2018 at 11:51 AM.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: .Hyperlinks.Add Error Midway through Routine

    You could try inserting the HYPERLINK function instead. You won't get a screen tip, though.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-15-2018
    Location
    Midwest
    MS-Off Ver
    Office 365
    Posts
    55

    Re: .Hyperlinks.Add Error Midway through Routine

    Thank you that will solve the interim problem. As these issues get resolved over time, the limitation may be hit initially, but they quickly resolve to well below that 66,530 limitation.

  6. #6
    Registered User
    Join Date
    01-15-2018
    Location
    Midwest
    MS-Off Ver
    Office 365
    Posts
    55

    Re: .Hyperlinks.Add Error Midway through Routine

    While this did identify the issue, creating an if then (if number reached then do something different), the alternative workaround proved to not work either. After multiple testing, it seems the concept would work, but the code

    Please Login or Register  to view this content.
    does not work. I am at loss as to what part of it does not work. Again tested for over a dozen runs. The fields are good, but I still get a 1004 error.

    I appreciate any advise on how to resolve the problem. I think I have been staring at the problem for too long! Hopefully, fresh eyes might point out a solution.

    It is mapping to the right address for the .range(aaddress).formula portion ==> '[Testing.xlsx]QC Results'!$D$65535
    It appears to be getting the right information in the formula ==> =HYPERLINK('Data Consolidated'!$G$2, Data Consolidated G2)

  7. #7
    Registered User
    Join Date
    01-15-2018
    Location
    Midwest
    MS-Off Ver
    Office 365
    Posts
    55

    Re: .Hyperlinks.Add Error Midway through Routine

    I found part of the problem.

    Please Login or Register  to view this content.
    should be

    Please Login or Register  to view this content.
    However, the code
    Please Login or Register  to view this content.
    is producing an error as well.
    Last edited by learning new things; 11-05-2018 at 05:40 PM. Reason: correcting formation

  8. #8
    Registered User
    Join Date
    01-15-2018
    Location
    Midwest
    MS-Off Ver
    Office 365
    Posts
    55

    Re: .Hyperlinks.Add Error Midway through Routine

    Ok. After a few hours of looking. I found bits and pieces that led to a solution. I am not sure if there is a more effective way, but here is a final solution that works.

    Thanks to 6stringjazzer the primary problem of a limitation within Excel was identified. The possible workaround proposed by 6stringjazzer also got me on the right path for a viable solution.
    Please Login or Register  to view this content.

+ 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. [SOLVED] Error checking routine - check range values on various worksheets and report if error
    By TheRobsterUK in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-29-2014, 06:36 AM
  2. Excel Hyperlinks in Powerpoint Error - Hyperlinks stripped
    By memsimpson in forum Excel General
    Replies: 1
    Last Post: 05-27-2014, 01:55 PM
  3. Excel Hyperlinks in Powerpoint Error - Hyperlinks stripped
    By memsimpson in forum Excel General
    Replies: 0
    Last Post: 05-27-2014, 09:25 AM
  4. Calculating the midway point bewteen 2 times
    By LAB_RAT in forum Excel General
    Replies: 2
    Last Post: 11-02-2011, 02:20 AM
  5. Macro 'stopping' midway
    By rushdenx1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-15-2010, 01:02 PM
  6. [SOLVED] Error Routine
    By Karen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-13-2005, 09:05 PM
  7. On Error routine...
    By Chris M in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-01-2005, 12:05 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