Skip to content

NavigateError Event

Description

Fires when an error occurs during navigation.

Syntax

Public Event NavigateError( _
    ByVal pDisp As Object, _
    ByRef URL As Variant, _
    ByRef TargetFrameName As Variant, _
    ByRef StatusCode As Variant, _
    ByRef Cancel As Boolean _
)

Parameters

  • pDisp: Object that evaluates to the top-level or frame WebBrowser object corresponding to the failed navigation.
  • URL: String expression that evaluates to the URL for which navigation failed.
  • TargetFrameName: String that evaluates to the name of the frame in which the resource is to be displayed, or Null if no named frame is targeted for the resource.
  • StatusCode: Integer that contains a status code corresponding to the error, if available.
  • Cancel: Boolean that specifies whether to cancel the navigation to an error page and/or any further autosearch.

Default Values

  • False: Continue with navigation to an error page and/or autosearch.
  • True: Cancel navigation to an error page and/or autosearch.

Remarks

This event fires before Microsoft® Internet Explorer displays an error page due to an error in navigation. An application has a chance to stop the display of the error page by setting the Cancel parameter to True. However, if the server contacted in the original navigation supplies its own substitute page navigation, setting Cancel to True will have no effect and the navigation to the server's alternate page will proceed.

See Also

WebBrowser Control


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.