Microsoft xml v6.0 not working in excel 2013

moe0303

Board Regular
Joined
Dec 2, 2009
Messages
61
Related thread: http://www.mrexcel.com/forum/excel-questions/783092-new-computer-3.html

Hello,

I have a weird issue. I have spreadsheet with some macros that parse xml files and presents the data in relevant columns. The code was written in excel 2010 and works fine in that environment. When I try opening the file in 2013, I get a "User defined type not defined" error. If I change the reference to xml v3.0 instead of v6.0 it gets a little farther but eventually fails as well.

The code highlighted for the above error is:
Code:
Dim xmlFile As New MSXML2.DOMDocument
I tried changing DOMDocument to DOMDocument60, but also got errors (documented in the related thread). Internet searches have said something about they way DOMDocuments are exposed in 2013 is different. I'm not sure what any of that means. Have any of you guys ever heard of this problem?

-Moe
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
try this without new .

Dim xmlFile As MSXML2.XMLHTTP60
Set xmlFile = CreateObject("MSXML2.XMLHTTP.6.0")


or

Dim xmlFile As MSXML2.DOMDocument60
Set xmlFile = New MSXML2.DOMDocument60
 
Last edited:
Upvote 0
or maybe,
Code:
Dim xmlFile As MSXML2.DOMDocument
set xmlFile = New MSXML2.DOMDocument
 
Upvote 0
try this without new .

Dim xmlFile As MSXML2.XMLHTTP60
Set xmlFile = CreateObject("MSXML2.XMLHTTP.6.0")

ended up with this error: "Object doesn't support this property or method" for
Code:
xmlFile.async = False


or

Dim xmlFile As MSXML2.DOMDocument60
Set xmlFile = New MSXML2.DOMDocument60

Resulted with Run-time error '91': Object variable or With block variable not set at the following line:
Code:
STIG = xmlFile.selectSingleNode("Benchmark").selectSingleNode("title").nodeTypedValue
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,249
Messages
6,171,031
Members
452,374
Latest member
keccles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top