Adding a reference to VBA code add-in

tomguest

New Member
Joined
May 11, 2011
Messages
1
Hi

I have a Excel Add-in that I want to keep password protected. One of the references that is needed to be added via the tool->references is Microsoft XML, v2.0

The user is unable to add this without knowing the password. I've thought about adding it via some VBA code but there is a problem with that.

When Excel is started, after installing the add-in, an error is shown that there is a problem in the VBA code - basically a variable is defined and the variable type is defined in the xml reference I'm trying to add. Excel does not load any of the VBA code so I can't add the references at that point programmatically.

I can then get the user to manually run a macro that adds the references to the add-in. The problem is that I would then want the user to be able to save the xla file so the references get saved with it. Since it is password protected this is not possible.

Is it possible to

a) save the xla file via VBA in the xla file (sounds doubtful)

b) add references to a general template that adds the references to all files loaded in excel

or does anybody have any suggestions/solutions?

Cheers

Tom
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Forum statistics

Threads
1,224,585
Messages
6,179,704
Members
452,938
Latest member
babeneker

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