NewWindow Event

Fires when a new window is to be created.

Syntax

  Private Sub object_NewWindow( _
  ByRef ppDisp As Object, _
  ByRef Cancel As Boolean)

Parameters

  • object
    Object expression that resolves to the objects in the Applies To list.
  • ppDisp
    Object expression that, optionally, receives a new, hidden WebBrowser or InternetExplorer object with no URL loaded.

  • Cancel
    A Boolean value that determines whether the current navigation should be canceled.

    • true
      Cancel the navigation.
    • false
      Do not cancel the navigation.

Error Codes

No return value.

Remarks

This event is obsolete. Use the NewWindow2 event instead.

Applies To

InternetExplorer, WebBrowser