Change

Tim Francis-Wright

Board Regular
Joined
Feb 19, 2002
Messages
76
Office Version
  1. 2013
Platform
  1. Windows
I maintain spreadsheets at work that have a number of macros in them, and it's almost time to upgrade the Excel that everyone uses from 2013 to 2016. For most of the macros, the change matters not at all, but two of the macros interact with other programs, and (of course) they use early binding. Right now, the one person using Office 2016 has anyone using the new Excel has been saving his work, and when his Office 2013 colleagues open the file, they get a (fatal) error because Excel 2013 cannot access the Office 16.0 Object Library.

I know the way around this is to use late binding instead of early binding; I was able to fix Problem Macro A (which interacts with Outlook). But Problem Macro B is still a problem.

Here is the existing, early binding code snippet:
VBA Code:
'Problem Macro B ("PMB")
Dim requestXML As New MSXML2.XMLHTTP30
'Other, potentially sensitive lines excised

That code works fine on my machine, which has the following references:
Rich (BB code):
Visual Basic for Applications
Microsoft Excel 15.0 Object Library
Microsoft Forms 2.0 Object Library
Microsoft XML, v6.0

I attempted to convert PMB to late binding:
VBA Code:
Dim requestXML As Object
Set requestXML = CreateObject("MSXML2.XMLHTTP.3.0")

I have seen in different places other possibilities for the CreateObject reference ("MSXML2.XMLHTTP30", "MSXML2.XMLHTTP", "MSXML2.XMLHTTP60", etc.) None work. The error I consistently get is 429, "ActiveX component can't create object." What do I need to do to get late binding to work here?
 

Some videos you may like

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

GWteB

Well-known Member
Joined
Sep 10, 2010
Messages
1,295
Office Version
  1. 2013
Platform
  1. Windows
Try:
VBA Code:
Set requestXML = CreateObject("MSXML2.XMLHTTP.6.0")
It doesn't error, however it's giving me "This method cannot be called until the sent method is called"
 

Watch MrExcel Video

Forum statistics

Threads
1,128,107
Messages
5,628,729
Members
416,333
Latest member
Time2Learn

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
Top