Dim xml As DOMDocumentPrivate Sub Command1_Click()
Set xml = New DOMDocumentCall xml.Load(App.Path & "gb2312.xml")Dim root As IXMLDOMElement
Set root = xml.documentElementDim node As IXMLDOMNode
For Each node In root.childNodes
Debug.Print node.Text
NextEnd Sub
root.childNodes
对象或with块变量未设置
Set xml = New DOMDocumentCall xml.Load(App.Path & "gb2312.xml")Dim root As IXMLDOMElement
Set root = xml.documentElementDim node As IXMLDOMNode
For Each node In root.childNodes
Debug.Print node.Text
NextEnd Sub
root.childNodes
对象或with块变量未设置
if XMLFile.Load(FileName) then
if XMLFile.parsed then
msgbox "成功"
end if
end if
filename=app.path & "gb2312.xml"
显然应该这样才对
if right$(app.path) <> "\" then
filename=app.path & "\"
else
filename=app.path
end if
filename =filename & "gb2312.xml"