Xml 编译错误:赋值左侧的函数调用必须返回变量或对象

Xml 编译错误:赋值左侧的函数调用必须返回变量或对象,xml,vba,excel,xmlhttprequest,Xml,Vba,Excel,Xmlhttprequest,我正在尝试加载一个XML文件,我正在使用XML6.0参考库 错误发生在“xDom.load”行(见下文)。问题是什么 Private Sub run() ' run the whole operation Dim http_req As http_req: Set http_req = New http_req Dim xDom As MSXML2.DOMDocument60 Dim url As String: url = "http://www.ecb.europa.eu/stats/e

我正在尝试加载一个XML文件,我正在使用XML6.0参考库

错误发生在“xDom.load”行(见下文)。问题是什么

Private Sub run() ' run the whole operation

Dim http_req As http_req: Set http_req = New http_req
Dim xDom As MSXML2.DOMDocument60

Dim url As String: url = "http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml"

Set xDom = New MSXML2.DOMDocument60
xDom.Load = "http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml"

Call find_ClassElement(xDom)

End Sub

自从我在Delphi中做了一小段时间后,我就没有使用过msxml,但我认为加载是方法调用。您正在尝试将Load的引用设置为字符串。试一试

xDom.Load("http://www.ecb........")