Hello. I am trying to do some error handling with the FollowHyperlink. It's not working. Instead of my messages, I am still getting the standard VBA Window telling me there was an error. When there is no error, the code works fine. Here is my code I am currently using:
I want a message to popup when a URL is incorrect or if the data is not correct. I feel so defeated with now! Can anyone spot what I might be doing wrong?Code:Private Sub List12_Click() On Error GoTo List12_Click_Handler Dim strRemover As String Dim strRealURL As String Dim opPos As Integer Dim clPos As Integer strRemover = Me.List12.Column(1) opPos = InStr(strRemover, "#") clPos = Len(strRemover) strRealURL = Mid(strRemover, opPos + 1, clPos - 1) FollowHyperlink strRealURL Exit_List12_Click: Exit Sub List12_Click_Handler: Select Case Err.Number Case 8: Resume Next MsgBox "You forgot to click your cert. Please restart Access." Resume Exit_List12_Click Case Else: Resume Next MsgBox "URL is incorrect." Resume Exit_List12_Click End Select End Sub