请原谅VBA较新的任何无知。我目前遇到以下错误:
编译错误: 用户定义的类型未定义
我想这可能需要启用参考;如果是这样,请您建议哪一个。顺便说一句,有没有办法确定通常需要哪些参考?
Option Explicit
Sub ProcessHTMLPage(HTMLPage As MSHTML.HTMLDocument)
Dim HTMLTable As MSHTML.IHTMLElement
Dim HTMLTables As MSHTL.IHTMLElementCollection
Set HTMLTables = HTMLPage.getElementsByTagName("eventtable")
For Each HTMLTable In HTMLTables
Debug.Print HTMLTable.className
End Sub