Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

BeforeNavigate Event

Fires before navigation occurs in the given object (on either a window or frameset element).

Syntax

        Private Sub object_BeforeNavigate( _
	ByVal pDisp As Object, _
	ByRef url As Variant, _
	ByRef Flags As Variant, _
	ByRef TargetFrameName As Variant, _
	ByRef PostData As Variant, _
	ByRef Headers As Variant, _
	ByRef Cancel As Boolean)

Parameters

object
Object expression that resolves to the objects in the Applies To list.
pDisp
Object that evaluates to the top level or frame WebBrowser object corresponding to the navigation.
url
String expression that evaluates to the URL to which the browser is navigating.
Flags
Reserved. Set to zero.
TargetFrameName
String expression that evaluates to the name of the frame in which the resource will be displayed, or Null if no named frame is targeted for the resource.
PostData
Data to send to the server if the HTTP POST transaction is being used.
Headers
Value that specifies the additional HTTP headers to send to the server (HTTP URLs only). The headers can specify such things as the action required of the server, the type of data being passed to the server, or a status code.
Cancel
Boolean value that the container can set to True to cancel the navigation operation, or to False to allow it to proceed.

Remarks

This event is obsolete. Use the BeforeNavigate2 event instead.

Applies To

InternetExplorer, WebBrowser

Community Additions

Show:
© 2015 Microsoft