WEB Browser Control
Hi
Your approach is unfamiliar to me, but I believe, from a glance, that the
loop uses all available CPU cycles and prevents the control from doing its
job. I can praise Visual Basic for days, but handling parallell processes is
not what it does best -or does at all.
There are several useful events in this control, I use these a lot:
WebBrowser1_StatusTextChange
WebBrowser1_BeforeNavigate2
WebBrowser1_DocumentComplete
So I suggest you trig the desired "go on" action from DocumentComplete.
HTH. Best wishes Harald
"JT" skrev i melding
...
We have a spreadsheet with a Web Browser Control in it.
Our macro moves thru different pages on the control using
code something like this
Worksheets
(1).WebBrowser1.Navigate "https:/company/homepage.com/docs
/VendList.cmd"
We then inserted the following code to cycle thru until
the page is displayed.
Do While Not intReadyState = 4
intReadyState = Worksheets(1).WebBrowser1.ReadyState
Loop
The nect code resets the ReadyState to 0 to begin the
navigation to the next panel.
intReadyState = 0
Something is not right. The new page is not displaying in
the Web Browser Control unless I hit CTL+ALT+DEl and then
click on debug.
Once I do this then the "new" page is displayed or the Web
Browser Control appears to be refreshed with the new page.
This is our first attempt to use this control and any
suggestions on making this run better would be
appreciated. Thanks for the help.
|