试一试Dim WithEvents ieView As InternetExplorer Private Sub Command1_Click() ieView.Refresh End SubPrivate Sub Form_Load() Set ieView = NothingOn Error Resume Next '设置错误陷阱 Set ieView = GetObject("", "InternetExplorer.Application") ieView.Navigate vUrl 'vUrl为debug.htm 完整的URL End Sub
类型不匹配 ,Automation 错误
就是那个 microsoft Internet controls 塞
我把该去掉的都去掉了,结果只剩下,而且我还是创建的标准 EXE 来调试的;Dim WithEvents ieView As InternetExplorerPrivate Sub Command1_Click() Set ieView = GetObject("", "InternetExplorer.Application") End Sub就这样就提示 Set ieView = GetObject("", "InternetExplorer.Application") 类型不匹配 为什么啊,我已经引用了 microsoft Internet controls。另外,如果不定义 ieView ,则 Set ieView = GetObject("", "InternetExplorer.Application") 可顺利运行。
Private Sub Command1_Click()
ieView.Refresh
End SubPrivate Sub Form_Load()
Set ieView = NothingOn Error Resume Next '设置错误陷阱
Set ieView = GetObject("", "InternetExplorer.Application")
ieView.Navigate vUrl 'vUrl为debug.htm 完整的URL
End Sub
Set ieView = GetObject("", "InternetExplorer.Application")
End Sub就这样就提示 Set ieView = GetObject("", "InternetExplorer.Application") 类型不匹配
为什么啊,我已经引用了 microsoft Internet controls。另外,如果不定义 ieView ,则 Set ieView = GetObject("", "InternetExplorer.Application") 可顺利运行。