I am trying to extract links from webpages, but it seems webbrowser does not navigate, so I get infinite loop at webbrowser1.readstate <> readystate_complete...
HOWEVER, if make a breakpoint at webbrowser1.readstate <> readystate_complete, the webbrowser navigates successfully in the userform, and code works....
Any ideas? Thanks
Do Until n = num
WebBrowser1.Navigate URL
Do While WebBrowser1.readyState <> READYSTATE_COMPLETE
Loop
If WebBrowser1.readyState = READYSTATE_COMPLETE Then
'code
end if
n = n +1
loop
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…