Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use ppDisp

Status
Not open for further replies.

jay813

Programmer
Oct 10, 2012
3
US
I am using a web browser control inside a userform. The web page I am browsing with it generates popups, and I need to take control of the popup (it inserts values into specific fields related to the option that forces the onchange event). Either by using a form or ppDisp. I cannot get ppDisp to work correctly. The easiest way to solve this issue is to get ppDisp to work correctly:

Code:
Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
Dim frm As UserForm1
Set frm = UserForm1Set ppDisp = frm.WebBrowser2.Application
End Sub

This works only one time. Once the popup closes itself and inserts values into my web browser control, the web browser2 control will not pop up again, so the web browser control needs to create itself on the fly or not let the popup close it out completely. I would also like to see if I can get this on its own form, since some of the popup windows dont have the ability to exit. Using webbrowser2.object instead of application is incorrect and VBA does not like it.

Alternatively, creating a userform solves some of the problems, but it doesnt solve where to put the data which is going to be impossible to figure out, since the form fields load dynamically and arent in a set position. What would you do to solve this?

 
UserForm?

Are you lost? This sounds like an Office VBA question or something, maybe Excel?

There is a forum for that here someplace. Try forum707
 
the code is the almost the same whether its in vb6/vba, but ill try posting there then
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top