Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003

    Unanswered: Follow Hyperlink Error Trapping

    I am coming across some issues I can't seem to figure out. I am currently using the followHyperlink call to launch all stored references to files and urls. i.e. Word documents, Excel Spreadsheets, PDFs. the problem is that if there is an error, I can't seem to be able to trap the error. Does anyone have any ideas?

    M is a memo object. It has a variable URL that stores a web address. Occassionally these urls point to a PDF. If a user chooses cancel from this window an error occurs. But is not trapped. Following is my code.

    Dim str As String

    On Err GoTo errorHandler
    'Make sure this is a viable Address call
    If Left(M.URL, 7) <> "http://" Then
    str = "http://" & M.URL
    str = M.URL
    End If

    Application.FollowHyperlink str, , True, False

    Exit Sub


    MsgBox "Error trying to launch webpage. Please ensure that the URL you are trying to reach is correct", vbCritical, Error
    Resume Exit_Point

  2. #2
    Join Date
    Dec 2003

    Follow up

    Just bringing this to the top of the list to see if anyone has any ideas on how one might go about solving this. Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts