|
-
Jan 15th, 2013, 01:32 PM
#1
Thread Starter
Addicted Member
[RESOLVED] problems with navigating webbrowser on form1 from form2
I have webbrowser1 on form1.
I would like for a user to be able to click a button on form2 and have that button do two things
1. navigate form1.webbrowser1 from one document to another (for the sake of this lets just say www.google.com to www.yahoo.com)
2. after the webbrowser has navigated continue with the rest of the code
The problem is that the webbrowser will only navigate after the form2 button click is done or after i make a msgbox popup.
Why would the webrowser only navigate after a msgbox pops up?
an example of my form2.buttonclick event
form1.webbrowser1.navigate("www.yahoo.com")
debug.print form1.webbrowser1.url
'shows www.google.com
'i tried making a do while webbrowser1.readystate loop here but it goes forever because webbrowser1 never navigates
'i also tried using the form1.webrowser1 on navigate completed event but again it fails because webrowser1 never navigates.
msgbox ("this msgbox makes the webbrowser navigate")
debug.print form1.webbrowser1.url
'shows www.yahoo.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|