I enter a stock code I want the price for in a hidden webbrowser control and then simulate clicking the submit button using the below code. The problem is the page hasn't finished loading by the time I get the source code of the page.
I thought the loop I've got would have worked but it doesn't?? Are there any other ways to "do nothing" until a page has finished displaying all text/images etc...??
VB Code:
WB1.Document.All("SecurityCode").Value = QuoteInfo(1, i) 'share code WB1.Document.getElementById("btnAction").Click 'submit form 'while page is loading do nothing Do While WB1.ReadyState <> READYSTATE_COMPLETE DoEvents Loop 'Get html source SourceCode = WB1.Document.documentElement.OuterHTML




Reply With Quote