Dim strurl As String
Dim strweb As String
Strurl="http://guba.eastmoney.com/list, 600000 HTML"
WebBrowser1. Navigate2 (strurl)
Strweb=WebBrowser1_DocumentComplete
MsgBox strweb
End Sub
CodePudding user response:
You should be in the event of an WebBrowser1_DocumentComplete processing after downloading the content of the... Navigate2 immediately after obtaining content was not possible,CodePudding user response:
Dim strweb As StringPrivate Sub Command1_Click ()
WebBrowser1. Navigate2 "http://guba.eastmoney.com/list, 600000 HTML"
End Sub
Private Sub WebBrowser1_DocumentComplete (ByVal pDisp As Object, the URL As the Variant)
Strweb=WebBrowser1. Document. All the outerhtml
If (pDisp Is WebBrowser1. Object) Then MsgBox "web page download!"
End Sub
There is an error prompt
Real-time error '91' :
Object variables or variable is not set With block
This sentence is yellow strweb=WebBrowser1 Document. All the outerhtml
What's the cause of the
CodePudding user response:
Used like this:WebBrowser1. Document. DocumentElement. OuterHTML