Results 1 to 8 of 8

.Hyperlinks.Add Error Midway through Routine

Threaded View

  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:

        cAddress = g_cSheet.Cells(cRow, cCol).Address
        anchorCol = FindColumn(QCSheet, QCCol04) 'anchor column'
        Set aAddress = QCSheet.Cells(qcLastRow + 1, anchorCol)
        saAddress = "'" & g_cSheet.Name & "'!" & g_cSheet.Cells(cRow, cCol).Address
        stText = "Go to " & cAddress & " in the '" & g_cSheet.Name & "' sheet."
        ttDisplay = g_cSheet.Name & " " & Replace(cAddress, "$", "")
        
        With QCSheet
            .Hyperlinks.Add _
                Anchor:=aAddress, _
                Address:="", _
                SubAddress:=saAddress, _
                ScreenTip:=stText, _
                TextToDisplay:=ttDisplay
        End With
    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

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. 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