Private Sub WebBrowser1_StatusTextChange(ByVal Text As String) Debug.Print Text End Sub
更多追问追答
追问
这是测试的吧,怎么用的
追答
Text 就是网页的状态啊。
追问
怎么使用。使用方法能说说???直接在代码中写好后,直接按执行按钮吗?
追答
Dim a Private Sub Form_Load() WebBrowser1.Navigate "http://www.baidu.com" End Sub Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant) Me.Print a End Sub Private Sub WebBrowser1_DownloadComplete() If a = "Internet Explorer 无法显示该网页" Then a = "打开网页失败" End Sub Private Sub WebBrowser1_TitleChange(ByVal Text As String) a = Text End Sub