Table of contents
TOC
Collapse the table of content
Expand the table of content

WebBrowserControl.NavigateError Event (Access)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Occurs when an error occurs during navigation.

Syntax

expression. NavigateError( ** pDisp, ** URL, ** TargetFrameName, ** StatusCode, ** Cancel** )

expression A variable that represents a WebBrowserControl object.

Parameters

NameRequired/OptionalData TypeDescription
pDispRequiredObjectA pointer to an IDispatch interface for the WebBrowser object that represents the window or frame in which the navigation error occurred.
URLRequiredVariantContains the URL for which navigation failed.
TargetFrameNameRequiredVariantContains the name of the frame in which to display the resource, or NULL if no named frame was targeted for the resource.
StatusCodeRequiredVariantContains an error status code, if available.
CancelRequiredBooleanSpecifies whether to cancel the navigation to an error page or to any further autosearch.

Return Value

nothing

Remarks

This event fires before the WebBrowser control displays an error page due to an error in navigation. You can 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, when you set Cancel to True, it has no effect, and the navigation to the server's alternate page proceeds. For example, assume that a navigation to http://www.www.wingtiptoys.com/BigSale.htm causes this event to fire because the page does not exist. However, the server is set to redirect the navigation to http://www.www.wingtiptoys.com/home.htm. In this case, when you set Cancel to True, it has no effect, and navigation proceeds to http://www.www.wingtiptoys.com/home.htm.

See also

Concepts

WebBrowserControl Object

© 2018 Microsoft