Webbrowser RegisterAsBrowser in Modal Appliction
Hi ppl,
I have a modal application where I have a form with a webbrowser control on it. When the user select a link which opens a new window I am trying to handle the event to open a new form with an other webbrowser control to show the select link in this new window. I am trying to achieve this by doing
Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Dim ie As frmIvan
Set ie = New frmIvan
ie.WebBrowser1.RegisterAsBrowser = True
Set ppDisp = ie.WebBrowser1.object
ie.Show vbModal
Set ie = Nothing
Cancel = True
End Sub
The form frmIvan opens with the browser on it but it does not navigate on the selected page. Any one gas any idea what might be wrong
Thanks
Ivan
Re: Webbrowser RegisterAsBrowser in Modal Appliction
This line of code:
Code:
Set ppDisp = ie.WebBrowser1.object
..takes whatever is in ie.WebBrowser1.object and puts it in ppDisp
Shouldn't that be the other way around?