Home > Software engineering >  Use controls webbowser download page where is the source code is not a problem, please help
Use controls webbowser download page where is the source code is not a problem, please help

Time:09-30

Private Sub Command1_Click ()
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 String
Private 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
  • Related