Private Sub Command1_Click()
txtError.Text = ""
WebBrowser.Navigate2 txtNavigate.Text
End Sub
Private Sub Form_Load()
End Sub
Private Sub WebBrowser_NavigateError(ByVal pDisp As Object, _
URL As Variant, Frame As Variant, StatusCode As Variant, Cancel As Boolean)
Select Case StatusCode
'Show in the field textbox the type error:
Case "-2146697214": txtError.Text = "URL string is not valid"
Case "-2146697213": txtError.Text = "No session found"
Case "-2146697212": txtError.Text = "Unable to connect to server"
Case "-2146697211": txtError.Text = "Requested resource Is Not found"
Case "-2146697210": txtError.Text = "Requested object Is Not found"
Case "-2146697209": txtError.Text = "Requested Data Is Not available"
Case "-2146697208": txtError.Text = "Failure occurred during download"
Case "-2146697207": txtError.Text = "Requested navigation requires authentication"
Case "-2146697206": txtError.Text = "Required Not media Or valid"
Case "-2146697205": txtError.Text = "Connection timed out"
Case "-2146697204": txtError.Text = "Request is invalid"
Case "-2146697203": txtError.Text = "Protocol is not recognized"
Case "-2146697202": txtError.Text = "Navigation request has encountered a security issue"
Case "-2146697201": txtError.Text = "Unable to load data from the server"
Case "-2146697200": txtError.Text = "Unable to create an instance of the object"
Case "-2146697196": txtError.Text = "Attempt to redirect the navigation failed"
Case "-2146697195": txtError.Text = "Navigation redirected to a directory"
Case "-2146697194": txtError.Text = "Unable to lock request with the server"
Case "-2146697193": txtError.Text = "Reissue request with extended binding"
Case "-2146697192": txtError.Text = "Binding is terminated"
Case "-2146697960": txtError.Text = "Permission to download is declined"
Case "-2146696704": txtError.Text = "Result is dispatched"
Case "-2146696448": txtError.Text = "Cannot replace a protected System File Protection (SFP) file"
End Select
End Sub