Caller Range in XLL Add In

Add-in Express™ Support Service
That's what is more important than anything else

Caller Range in XLL Add In
How to determine the Caller Range in a UDF in the XLL Containe 
Andrei Smolin


Add-in Express team


Posts: 15192
Joined: 2006-05-11
Hello Michael,

Registering an Add-in Express project from Visual Studio works differently.

Michael Kaden writes:
the Reg Key you mentioned is not present on my machine.


That key depends on the Excel version used; 9 - Excel 2000, 12-2007, 14-2010, 16 - 2016.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 01 Dec, 2017 10:54:56 Top
Michael Kaden




Posts: 140
Joined: 2017-11-15
Dear Andrei,

So when registering via Visual Studio, does my earlier comment makes sense? (this was referring to register/unregister via the Visual Studio menu - sorry I did not mention that)

PS I have the impression that Public Shared Sub UnregisterXLL is called twice instantly when unregister is initiated as the project is unregistered even with the warning, and when Public Shared Sub UnregisterXLL is commented out no warning comes and the project is still unregistered.


I can live with warning MSB3061 when registering via Visual Studio, but would prefer if the warning would be resolved.

Regards

Michael
Posted 02 Dec, 2017 05:45:12 Top
Andrei Smolin


Add-in Express team


Posts: 15192
Joined: 2006-05-11
Michael,

When you register/unregister the add-in from the IDE, Add-in Express sets the Register for COM interop check box and invokes MSBuild to build the project. That check box causes invoking the methods denoted with the ComUnregisterFunction and ComRegisterFunction attributes so that your add-in becomes registered; it invokes UnregisterXLL first and RegisterXLL then. Commenting out these methods causes your add-in to be left unregistered. At the install time, adxregistrator.exe invokes these methods twice in order to register (unregister) your add-in with the 32bit and 64bit registry. This lets your users to install a different bitness of Office and still have your add-in working.

Note that registering from the IDE invokes UnregisterXLL first and RegisterXLL then.

As to the MSB3061 warning I explained that it looks like it as being caused by MSBUILD not unloading the assembly in time. Note that the warning is associated with a counter: VS tries to delete the file several times and raises an error if the counter is greater than 10. That is, I assume this is a "legal" warning.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 04 Dec, 2017 07:42:54 Top