Private Sub Label1_Click()
Dim ie As New InternetExplorer
ie.Visible = True
ie.Navigate "www.sina.com"
End Sub这条单独执行没问题。但是如果再增加一个wenbrowser1控件后,在执行
Private Sub Label1_Click()
Dim ie As New InternetExplorer
ie.Visible = True
ie.Navigate "www.sina.com"
End Sub就报错。编译不通过改成:Private Sub Label1_Click()
Set ie = CreateObject("InternetExplorer.application")
With ie
.Visible = True
.Navigate "www.sina.com"
End With
End Sub
就不报错,可以执行。
Dim ie As New InternetExplorer
ie.Visible = True
ie.Navigate "www.sina.com"
End Sub这条单独执行没问题。但是如果再增加一个wenbrowser1控件后,在执行
Private Sub Label1_Click()
Dim ie As New InternetExplorer
ie.Visible = True
ie.Navigate "www.sina.com"
End Sub就报错。编译不通过改成:Private Sub Label1_Click()
Set ie = CreateObject("InternetExplorer.application")
With ie
.Visible = True
.Navigate "www.sina.com"
End With
End Sub
就不报错,可以执行。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货