我刚刚更新到IE11。刚刚更新了我的报告(宏),它给了我一个运行时错误...运行时错误'13':类型不匹配。当我调试时,下面是它带我去的地方 - 特别是设置pDocument = IE.document ...你能帮忙吗?非常感谢你
Set IE = CreateObject("InternetExplorer.Application")
IE.navigate "https://famis.web.fedex.com/fwr/menus/menu-15-a.cfm?chgDiv=1&Division=09"
With IE
.Top = 1
.Left = 1
.Height = 400
.Width = 600
End With
IE.Visible = True
Do While IE.Busy
Loop
Dim pDocument As IHTMLDocument2
Dim pElements As IHTMLElementCollection
Dim pElement As IHTMLElement
Set pDocument = IE.document
Set pElements = pDocument.all
Worksheets("Setup").Range("A10").Value = IE.LocationName
If IE.LocationName = "SSO Login" Then
答案 0 :(得分:0)
确保选中参考:Microsoft HTML Object Library。
您可以在VBA编辑器中进入工具/参考。