“User-defined type not defined” – Excel 2010 XML Import Error

Print Friendly, PDF & Email

So you’ve created a magnificent automated report in Excel that just pulls the data in via XML and your customers go “wow!” when they see how easily your reports work, until….

Error: User-defined type not defined

Error: User-defined type not defined

This seams to be because a newer version of MSXML (v6.0 in this case) was installed. To get your document to work as expected again, you need to select the proper reference libraries for MSXML. In my case I needed to change it back to MSXML v3.0 to get it to work.

To do this:
Step 1: Press ALT+F11 to open the Visual Basic editor

Step 2: If you haven’t done so already, stop/reset the current operation that is running:

Stop the running operation

Stop the running operation

Step 3: Open the ‘References’ toolbox

Open 'Tools->References'

Open ‘Tools->References’

Step 4: Unselect MSXML 6.0

Unselect Microsoft XML, v6.0

Unselect Microsoft XML, v6.0

Step 5: Select MSXML 3.0 or 5.0

Select MSXML 3.0 or 5.0

Select MSXML 3.0 or 5.0

Step 6: Click ‘OK’ and run your macro again. Your XML import should work fine.

Share and Enjoy !

0Shares
0 0 0

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.