title: How to open dynamic WebBrowser link address in new window form?
body: <p>I have found the error at href so please help me</p>
  
  <pre><code>Private Sub WebBrowser1_NewWindow(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles WebBrowser1.NewWindow
      Dim thiselement As HtmlElement = WebBrowser1.Document.ActiveElement
      Dim targeturl As String = thiselement.GetAttribute("href") 
      e.Cancel = True
      Dim window As New Form1
      window.Show()
      window.WebBrowser1.Navigate(targeturl)
  End Sub
  </code></pre>
  
  <p>at "href" i have found error like Object reference not set to an instant of object.
  my code is in vb.net 2010.</p>