Works fine in debug, but can't install on a new machine

Oct 15, 2014 at 8:56 PM
When debugging, right from the start, it worked without a hitch. But when I tried to make it accessible on a new machine, it does not work.

The documentation says all I have to do is "File / Options / Addins / Browse" to add the addin. It lets me do that without complaining, but the functions are not available (#NAME error)

What is the missing key?
Oct 15, 2014 at 9:04 PM
Is it a complicated add-in, with other references? Maybe they're needed.
Maybe your Excel has copied the .xll file into the add-ins directory, but not any of the supporting files (like the .dna file and any .dll you need.) But then you'd get a different message...

Else start by checking the sample add-in in the full distribution.

Oct 15, 2014 at 9:26 PM
The documentation says:

In Excel, just File > Options > Addins. Install as an ordinary addin, not as a COM add-in even though communication may be using COM.

If I "... need other supporting files (like the .dna file ..." I would be happy to include them.

Like I said, it worked like a charm under debug, so I would not expect the sample to add much if the only thing I have to go on to distribute it is "In Excel just File >..."
Oct 15, 2014 at 9:37 PM
Sometimes Excel copies an add-in to the local AddIns directory. I don't know when Excel does this, or whether it's an option or what If Excel did this to your add-in, it might now be missing some of the files it needs, depending on how you've built the add-in, what references you have and so on.

I suggest the following sequence in an attempt to understand what went wrong:
  • Make sure that you copy all the files from the output directory on the development machine to the test machine.
  • Remove the add-in from the Excel add-ins list on the test machine and close Excel.
  • Double-click on the .xll in the folder you've copied in, and see if the add-in loads. You might try to spot the "Registering..." message that is briefly displayed in the status bar telling you that the add-in was loaded.
  • If you get any message indicating a problem, post the details back here.
  • If it does not work, download the full Excel-DNA distribution if you don't have it already and copy to the test machine.
  • Then double-click the Distribution\ExcelDna.xll add-in. It should add an "AddThem" function to your Excel.