I have old program was created it by VB6 and it was working good, I am using web browser control to load a webpage, then get the html inside a string, recently I received the below error message when I tried to load HTML code to a string variable, it's happen with big pages only.
My code as below
Dim html As String
Private Sub GetHtm_Click()
WebBrowser1.Navigate (webVar)
Do
DoEvents
Loop Until Not WebBrowser1.Busy
html = WebBrowser1.Document.documentElement.outerHTML
End Sub
WebBrowser1.Document.documentElement.outerHTML
only works in DocumentComplete
Events.
Private Sub WebBrowser1_DocumentComplete()
html = WebBrowser1.Document.documentElement.outerHTML
End Sub