SOLVED

Excel Add-in disconnecting

%3CLINGO-SUB%20id%3D%22lingo-sub-2522020%22%20slang%3D%22en-US%22%3EExcel%20Add-in%20disconnecting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2522020%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20an%20Excel%20add-in%20which%20I%20load%20to%20be%20able%20to%20use%20a%20custom%20function%20in%20it.%20I%20save%20everything%20and%20then%20when%20I%20open%20it%20later%2C%20the%20formula%20has%20the%20path%20to%20the%20file%20and%20the%20function%20and%20its%20parameters%2C%20but%20the%20result%20is%200.%20I%20then%20have%20to%20go%20back%20to%20the%20add-in%20manager%20and%20point%20to%20the%20XLAM%20file%20again.%20Then%20I%20edit%20the%20cell%2C%20remove%20the%20path%20and%20enter%2C%20which%20activates%20the%20function%20again.%20I've%20also%20noticed%20that%20after%20pointing%20to%20the%20XLAM%20in%20the%20Add-in%20manager%2C%20and%20then%20double%20clicking%20the%20actual%20XLAM%20file%20also%20causes%20the%20formula%20to%20refresh.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20obviously%20can't%20do%20this%20every%20time%20as%20I%20also%20have%20other%20files%20referencing%20this%20and%20I%20even%20have%20the%20files%20from%20this%20folder%20importing%20to%20a%20Power%20Query%2C%20so%20I%20can't%20edit%2Fupdate%20the%20formulas%20and%20add-in%20every%20time.%20The%20XLAM%20is%20protected%2C%20so%20I%20can't%20actually%20import%20the%20modules%20either.%20I've%20also%20already%20made%20the%20folder%20to%20the%20add-in%20a%20trusted%20location.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhy%20is%20it%20doing%20this%20and%20how%20do%20I%20fix%20it%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance%20for%20your%20help.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2522020%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2523544%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Add-in%20disconnecting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2523544%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1097423%22%20target%3D%22_blank%22%3E%40MierMoto%3C%2FA%3E%26nbsp%3BThere%20is%20probably%20a%20problem%20in%20your%20Excel%20entry%20in%20the%20registry.%3C%2FP%3E%0A%3CP%3EOpen%20the%20registry%20editor%20and%20navigate%20to%20this%20location%3A%3C%2FP%3E%0A%3CP%3EComputer%5CHKEY_CURRENT_USER%5CSOFTWARE%5CMicrosoft%5COffice%5C16.0%5CExcel%5COptions%3C%2FP%3E%0A%3CP%3EIn%20that%20key%2C%20most%20of%20Excel's%20settings%20are%20listed.%20Find%20the%20ones%20that%20begin%20with%20the%20word%20%22OPEN%22%20(without%20quotes)%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222021-07-07_16-40-15.png%22%20style%3D%22width%3A%20750px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F294036i6885E5AE3548221B%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222021-07-07_16-40-15.png%22%20alt%3D%222021-07-07_16-40-15.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3Elook%20closely%2C%20these%20MUST%20be%20in%20order%3A%20OPEN%2C%20OPEN1%2C%20OPEN2%2C%20OPEN3%2C%20.....%3C%2FP%3E%0A%3CP%3EIf%20there%20is%20a%20gap%2C%20make%20sure%20you%20close%20that%20gap%20by%20renaming%20them.%20Make%20sure%20you%20close%20Excel%20first.%3C%2FP%3E%0A%3CP%3EAfter%20renaming%20them%2C%20you%20should%20be%20able%20to%20add%20the%20add-in%20as%20usual.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2526158%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Add-in%20disconnecting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2526158%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F22322%22%20target%3D%22_blank%22%3E%40Jan%20Karel%20Pieterse%3C%2FA%3E%26nbsp%3Bthanks%20for%20the%20quick%20reply.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUnfortunately%20it%20doesn't%20seem%20to%20the%20solution%2C%20unless%20I'm%20checking%20the%20wrong%20folders.%20I%20have%20three%20OPTION%20entries%20and%20they're%20in%20the%20correct%20order%20(see%20below).%20I%20also%20followed%20the%20path%20you%20indicated%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22MierMoto_1-1625701049567.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F294181i4BC5FB43040B8A8C%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22MierMoto_1-1625701049567.png%22%20alt%3D%22MierMoto_1-1625701049567.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22MierMoto_0-1625700986219.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F294180i6E533AFBDA188324%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22MierMoto_0-1625700986219.png%22%20alt%3D%22MierMoto_0-1625700986219.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EI'm%20not%20sure%20that%20I'm%20just%20interpreting%20your%20last%20comment%20incorrectly%2C%20but%20I%20don't%20have%20an%20issue%20opening%20the%20add-in%2C%20it's%20just%20that%20when%20I%20use%20the%20custom%20function%20from%20the%20add-in%20in%20a%20cell%2C%20save%20and%20close%20the%20file%20and%20then%20later%20open%20it%2C%20it%20seems%20to%20have%20lost%20the%20connection%20to%20that%20function%20and%20reverts%20back%20to%20a%200%20result%20and%20instead%20of%20only%20showing%20the%20function%20name%2C%20it%20also%20has%20the%20path%20to%20where%20the%20function%20is%20stored%2C%20but%20it's%20not%20using%20it.%20I%20then%20have%20to%20going%20and%20re-point%20the%20add-in%20to%20the%20XLAM%20file%20and%20only%20then%20does%20it%20pick%20up%20the%20function.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBy%20the%20way%2C%20I%20also%20updated%20my%20post%20to%20say%20that%20I'm%20running%20Office%20365%2C%2064bit%20on%20Windows%2010.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2527127%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Add-in%20disconnecting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2527127%22%20slang%3D%22en-US%22%3EIf%20the%20add-in%20is%20checked%20in%20the%20list%20of%20add-ins%20and%20the%20add-in%20loads%20when%20Excel%20is%20opened%2C%20this%20normally%20works%20without%20a%20hitch.%3CBR%20%2F%3EHere%20are%20two%20articles%20I%20wrote%20about%20add-ins%20which%20may%20or%20may%20not%20apply%3F%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fjkp-ads.com%2FArticles%2FExcel-Add-ins-fail-to-load.asp%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fjkp-ads.com%2FArticles%2FExcel-Add-ins-fail-to-load.asp%3C%2FA%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fjkp-ads.com%2FArticles%2FFixLinks2UDF.asp%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fjkp-ads.com%2FArticles%2FFixLinks2UDF.asp%3C%2FA%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2527188%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Add-in%20disconnecting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2527188%22%20slang%3D%22en-US%22%3EThanks%20again%20for%20the%20reply.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20tired%20the%20security%20setting%20before%2C%20but%20I%20actually%20didn't%20have%20that%20option%20to%20unblock%20the%20file.%20The%20area%20at%20the%20bottom%20of%20my%20properties%20dialog%20is%20empty.%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20function%20I'm%20using%20is%20a%20UDF%2C%20but%20it%20works%20just%20fine%20when%20I%20enter%20it%20the%20first%20time.%20It'll%20be%3A%3CBR%20%2F%3E%3DBFCVolSimple(%22EP%22%2CR16088%2CS16088%2C5)%3CBR%20%2F%3E%3CBR%20%2F%3E...but%20then%20when%20I%20open%20it%20later%2C%20the%20cell%20value%20will%20be%200%20and%20the%20formula%20will%20be%3A%3CBR%20%2F%3E%3D'C%3A%5CUsers%5CUser%5CAppData%5CRoaming%5CMicrosoft%5CAddIns%5CBFC%20Volume%20Functions%20EP.xlam'!BFCVolSimple(%22EP%22%2CR16088%2CS16088%2C5)%3CBR%20%2F%3E%3CBR%20%2F%3EI%20also%20didn't%20change%20the%20file%20path.%20It's%20using%20the%20default%20%22C%3A%5CUsers%5CUser%5CAppData%5CRoaming%5CMicrosoft%5CAddIns%5CBFC%20Volume%20Functions%20EP.xlam%22%20path.%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi all,

 

I have an Excel add-in which I load to be able to use a custom function in it. I save everything and then when I open it later, the formula has the path to the file and the function and its parameters, but the result is 0. I then have to go back to the add-in manager and point to the XLAM file again. Then I edit the cell, remove the path and enter, which activates the function again. I've also noticed that after pointing to the XLAM in the Add-in manager, and then double clicking the actual XLAM file also causes the formula to refresh.

 

I obviously can't do this every time as I also have other files referencing this and I even have the files from this folder importing to a Power Query, so I can't edit/update the formulas and add-in every time. The XLAM is protected, so I can't actually import the modules either. I've also already made the folder to the add-in a trusted location.

 

I'm running Office 365 (64bit) on Windows 10.

 

Why is it doing this and how do I fix it?

 

Thanks in advance for your help.

14 Replies

@MierMoto There is probably a problem in your Excel entry in the registry.

Open the registry editor and navigate to this location:

Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Excel\Options

In that key, most of Excel's settings are listed. Find the ones that begin with the word "OPEN" (without quotes):

 

2021-07-07_16-40-15.png

look closely, these MUST be in order: OPEN, OPEN1, OPEN2, OPEN3, .....

If there is a gap, make sure you close that gap by renaming them. Make sure you close Excel first.

After renaming them, you should be able to add the add-in as usual.

@Jan Karel Pieterse thanks for the quick reply. 

 

Unfortunately it doesn't seem to the solution, unless I'm checking the wrong folders. I have three OPTION entries and they're in the correct order (see below). I also followed the path you indicated: 

MierMoto_1-1625701049567.png

 

MierMoto_0-1625700986219.png

I'm not sure that I'm just interpreting your last comment incorrectly, but I don't have an issue opening the add-in, it's just that when I use the custom function from the add-in in a cell, save and close the file and then later open it, it seems to have lost the connection to that function and reverts back to a 0 result and instead of only showing the function name, it also has the path to where the function is stored, but it's not using it. I then have to going and re-point the add-in to the XLAM file and only then does it pick up the function.

 

By the way, I also updated my post to say that I'm running Office 365, 64bit on Windows 10.

If the add-in is checked in the list of add-ins and the add-in loads when Excel is opened, this normally works without a hitch.
Here are two articles I wrote about add-ins which may or may not apply?
https://jkp-ads.com/Articles/Excel-Add-ins-fail-to-load.asp
https://jkp-ads.com/Articles/FixLinks2UDF.asp
Thanks again for the reply.

I tired the security setting before, but I actually didn't have that option to unblock the file. The area at the bottom of my properties dialog is empty.

The function I'm using is a UDF, but it works just fine when I enter it the first time. It'll be:
=BFCVolSimple("EP",R16088,S16088,5)

...but then when I open it later, the cell value will be 0 and the formula will be:
='C:\Users\User\AppData\Roaming\Microsoft\AddIns\BFC Volume Functions EP.xlam'!BFCVolSimple("EP",R16088,S16088,5)

I also didn't change the file path. It's using the default "C:\Users\User\AppData\Roaming\Microsoft\AddIns\BFC Volume Functions EP.xlam" path.
Fair enough. Sorry if I'm repeating my question, but:
1. Is that add-in checked in your list of add-ins
2. Is the add-in actually loaded (check in the VBA Editor in the project explorer, see whether it is there)
You say the add-in is protected; can you contact its developer by any chance?

@Jan Karel Pieterse  No problem! I really appreciate the help.

 

  1. It's definitely checked. In fact, when I reopen the file and I try to refresh the link to the UDF, I get prompted that the file already exists and whether I want to overwrite it. I keep it switched on. Simply opening the add-in dialog and checking whether it's switched on, doesn't help. I need to actually browse for it again (although it hasn't moved) and select it again. Only then does the formula update and the values revert to what they need to be.
  2. It's loaded when I use it at first. Then when I come back the file later, it's not in the VBA Editor anymore. When I then repoint it to the UDF, it pops back in the VBA Editor.
How exactly do you "try to refresh the link to the UDF" precisely?
From the above I think what is happening is that Excel does not load the add-in when Excel starts, even though it is checked, correct?
I suspect that's what happens, yes.

I refresh the link by opening the add-in manager again (where I can see it's in the list and ticked) and then I browse for the file (it immediately opens in the correct location, where I can see the file), I double click it and then it warms me that it's already there, to which I ignore it and overwrite it. Then the dialog closes and the cells immediately updates and shows the correct values.
best response confirmed by MierMoto (Occasional Contributor)
Solution

@MierMoto That is not how it is supposed to work (but you already know that).

 

A gap in the OPEN sequence in the registry would have explained this behavior, but apparently something else is amiss here.

 

All I can think of now is to suggest you to do an online repair of your Office. But I'm afraid that does not warrant a solution.
If you're brave (you'll loose your customizations and installed add-ins will be removed), you could:

  1. Close all instances of Excel (check in Taks manager, details tab, kill any trailing Excel.exe there)
  2. open regedit and export Excel's entry in the registry:
    Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Excel
  3. Delete that key

Now open Excel and install your add-in. Double-check if on reopening Excel the add-in loads. Then open your workbook which uses the UDFs.

@Jan Karel Pieterse that seems to have done the trick! Unfortunate that it had to go to that level, but it worked nonetheless.

 

Thank you so much for sticking in there and helping me through to a solution! I really appreciate that.

@MierMoto Which one helped please? The registry or the online repair?

@Jan Karel Pieterse it was the registry edit.

@MierMoto As a side note, I wrote this article today: https://jkp-ads.com/Articles/excel-addin-remove-problem.asp 

@Jan Karel Pieterse excellent, thanks for the extra tip. Fortunately I didn't get that annoying issue! Good to know though. These add-in issues seem to be quite persistent.