VBA to bind references

luvbite38

Active Member
Joined
Jun 25, 2008
Messages
368
Hi All,

Is there a way to attach the VBA references on opening the workbook. The users of my workbook can be both excel 2003 users and excel 2010 users.

I want my macro, when you open this specific workbook. Check the Application version and if the version is 2003, than attch Microsoft ActiveX Data Objects xx Library and Microsoft ActiveX Data Objects (Multi-dimensional) xx Library and if 2010 than Microsoft ActiveX Data Objects xx Library and Microsoft ActiveX Data Objects (Multi-dimensional) xx Library.
Where xx is relevant version no. for each 2003 and 2006.

Please help
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
You could instead use late binding and Excel would use the newest library.
 
Upvote 0

Forum statistics

Threads
1,216,179
Messages
6,129,329
Members
449,502
Latest member
TSH8125

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