Excel 2010 upgrade: Microsoft XML 5 vs 6

sampr

New Member
Joined
Jul 17, 2007
Messages
45
Hi,
I have a problem with Microsoft XML library when migrating to Excel 2010.
I currently have XLS and XLA files with vba code containing the following variable definition:
Dim oXmlHttp As New MSXML2.XMLHTTP50
In the VB Editor > Tools > References, I have a reference to Microsoft XML v5.0
This currently works fine on Excel 2003 and Excel 2007.

On Excel 2010 installations, sometimes Microsoft XML v5.0 is not present, and only Microsoft XML v6.0 is present. To use the v6.0 library, I'll have to change the reference of my VB project as well as change the variable definitions in all my code to
Dim oXmlHttp As New MSXML2.XMLHTTP60

My question is: how do you write one addin with code that can be used on Excel 2003, 2007 and 2010?

Thanks,
Sam
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Forum statistics

Threads
1,214,826
Messages
6,121,795
Members
449,048
Latest member
greyangel23

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