Late-binding and Adding references

simurq

Board Regular
Joined
Nov 11, 2011
Messages
73
I have two questions which really bother me and I'd like to solve them before going further coding...

# For the sake of compatibility with previous versions of Excel, I think of using late-binding but if the referenced library:
i) is not available on user's system, I have to notify him about the missing library.
ii) is not referenced, I have to add the reference programatically.

True / False?​

# How can I know the numbers of errors likely to occur when adding the references to ensure proper error-handling?

Thanks!
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
To be safe, delete the special references before using in production. Many will code in both and then remove the early binding references in the production version.

If you must use early binding and want to handle an errors, you will have a lot to consider. Solutions depend on the GUID. Here is one example for one library object. https://www.mrexcel.com/forum/excel...s-microsoft-activex-data-objects-library.html
 
Upvote 0
Thank you, Kenneth!

Yes, that's the plan indeed. I will delete the references and use late-binding when my app is released. But AFAIU the whole point of late-binding is if used properly, there is no need to add references programmatically. Is that correct?
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,843
Members
452,948
Latest member
UsmanAli786

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