word vba: webbrowser not navigating for ReadyState to check
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 noseratio The while loop you use in your question and in your answer is a busy waiting