I have written a VBA macro to load and parse an XML file. This exact code has worked fine for awhile, but now it's no longer functioning. I've tested it on two different computers running Excel 2013 64-bit. The code it fails on 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 continues if I comment out the Set command. It doesn't throw an error, it crashes Excel entirely. The code above is where the macro starts, there is no code running before it. I have set a reference to v6.0 of MSXML