Excel 16.0 Object Library - unable to deselect

JK2014

New Member
Joined
Oct 16, 2014
Messages
3
Hello,

Any idea why it is not possible to uncheck the Excel 16.0 Object Library, not even in a blank workbook?

I need to make my macro work for users with older versions of Excel. I've just finished updating my code to late binding only to find that I am still not able to deselect the Excel Library. But if I can't do it in a blank workbook, then I believe the problem is not in my code?

Perhaps the correct Excel library will select itself for users with previous versions?

Thanks and Happy New Year!!!
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
When you have your code in an Excel workbook, you don't need to do any kind of binding. I guess, technically, it's early binding by default.
If you have objects, properties that are Excel version sensitive, you need to code logically for that.
So you don't uncheck Excel 16.0 object library.

But if you were to be programming to Word from Excel, then you would use late or early binding.
 
Upvote 0
Hi starl, and thanks for your reply.

Just to be clear:
My code is saved in a module of an Excel workbook and it is launched from Excel.
It is primarily working with Excel workbooks, but it also occasionally interacts with Word and Outlook objects.
My Office 2010/13 users couldn't run it because I used early binding in the entire code (and, naturally, had the references to Word and Outlook selected).
I have now switched to late binding in the parts of code that work with Word and Outlook and unchecked the respective references.

So if I'm understanding you correctly, for the rest of my code that works with Excel objects, I don't need to use late binding when referencing these objects, because the code is in a workbook, right?
But if the code was in say a Word document module then I would need to do that, correct?

Lastly, those Excel version sensitive elements you mentioned - if I only have Excel 2010, 13 and 16 users, would there be many of them and what's the best way to find them?

Thanks,
 
Upvote 0
For an Excel workbook
1. If referencing Outlook or Word, early or late binding is required. You can do your initial programming with early binding (helps you access the tips), but late binding should then be used so that version does not matter.
2. When programming just Excel stuff, you don't explicitly do any binding. No matter what version other users may have, including Mac users. So, I program by default in Excel 2010. I sent the workbook to clients who use 2007, 2010, 2013, 2016. I don't do anything special. When you look at the Object Library, the Excel reference will automatically update.

For a Word document:
1. If referencing Outlook or Excel, early or late binding is required. (see up top for the rest of the lecture).
2. When programming just Word stuff, you don't explicitly do any binding. yadda yadda

For any Office product (but will refer to Excel):
Object models do change between versions. Thankfully, not much, but there are changes. Charts, Pivot Tables are Microsoft's favorite things to change lately.
For example, 2013 introduced .AddChart2 for creating charts. Try using that with a 2010 workbook and not only will the program not work, it won't even compile.
Two options are conditional compiling (which then allows the code to compile without errors, despite compatibility) or logic in your code that calls the correct object/property/method based on the application.version.
Conditional Compiling, in my opinion, isn't that crucial, though it can relieve headaches (uber proper programmers will likely argue with me). But the code logic is required, unless you program it all in the oldest version possible...though honestly, i do not know if that will work with some of the extreme changes recently - like pivot tables.
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,551
Members
449,088
Latest member
davidcom

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