that code is VB6...

try something like this

VB Code:
  1. Private Sub wb_NewWindow2(ByVal sender As Object, ByVal e As AxSHDocVw.DWebBrowserEvents2_NewWindow2Event) Handles WebBrowser1.NewWindow2
  2.         Try
  3.             e.ppDisp = frmPopupWindow.wb.Application
  4.             frmPopupWindow.Show()
  5.         Catch ex As Exception
  6.             MessageBox.Show("Error occured opening popup window")
  7.         End Try
  8.     End Sub

where frmPopupWindow is the form that will be the popup window form, and it has a webbrowser control on it called "wb"