WebBrowserControl.NavigateError Event (Access)
Occurs when an error occurs during navigation.
Version Information
Version Added: Access 2010
Syntax
expression .NavigateError(pDisp, URL, TargetFrameName, StatusCode, Cancel)
expression A variable that represents a WebBrowserControl object.
Parameters
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
pDisp |
Required |
Object |
A pointer to an IDispatch interface for the WebBrowser object that represents the window or frame in which the navigation error occurred. |
URL |
Required |
Variant |
Contains the URL for which navigation failed. |
TargetFrameName |
Required |
Variant |
Contains the name of the frame in which to display the resource, or NULL if no named frame was targeted for the resource. |
StatusCode |
Required |
Variant |
Contains an error status code, if available. |
Cancel |
Required |
Boolean |
Specifies 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.