MSXML2.DOMDocument60 Excel failed

I wrote a VBA macro to download and parse an XML file. This exact code worked fine, but now it no longer works. I tested it on two different computers with a 64-bit version of Excel 2013. The code in which it does not work is below:

Public Sub RunClashImport()
'This subroutine will import an XML clash report, parse it, and write it to our workbook
Dim iRow As Integer

'Get XML file
Dim xmlFile As MSXML2.DOMDocument60
Set xmlFile = New MSXML2.DOMDocument60

The code is saved if I comment on the Set command. It does not throw errors, completely destroys Excel. There is a macro in the code above, there is no code in front of it. I set the link to v6.0 from MSXML

enter image description here

+3
source share
1 answer

For 64-bit Windows, you must place your msxml6.dll inside C:\Windows\SysWOW64and then register it from this place by running this command on the command line regsvr32.exe C:\Windows\SysWOW64\msxml6.dll.

, .

+1

All Articles