Excel COM References

b33fy

New Member
Joined
Mar 8, 2011
Messages
5
Hi Guys,

Hope someone can assist.
- We have a custom DLL written in C#. The setup exe Registers the Type Library for the DLL on the users PC.
- We also have an Excel Macro Enabled Workbook which references to this TLB file.

The issue I am experiencing is when I create a new Excel Macro Enabled file and add references to the TLB it keeps track of the Version on my local PC. So when I send this to someone else in the organisation if they do not have the exact same version of the TLB it will return with a Missing Reference. I can understand why it does this but not idea in our situation.

Manual Fix
========
For the user, in Excel, if we Remove the Reference then add it back in (pointing to their local version) this fixes it but it has to be done manually.

Question
=======
Is there a way to Remove and Add a Reference in c# code (not VBA code)? Or open to any ideas on how to manage this. Please keep in mind rolling out the new DLL everytime there is a new version and re-registering the type library to everyone is not feasible for our situation.

Thanks

B
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Hey Everyone,

Just wondering how do software coys that deploy a new version of an Excel Add-In deploy it. I would think that somehow they would need to update the references in Excel to point to the new versions.

Any info would be greatly appreciated.

Thanks
 
Upvote 0

Forum statistics

Threads
1,224,525
Messages
6,179,319
Members
452,905
Latest member
deadwings

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