AddInModule.CurrentInstance is null while opening excel workbook.

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

AddInModule.CurrentInstance is null while opening excel workbook.
 
Subscribe
Jyothish M B




Posts: 2
Joined: 2025-05-07
Hi Team,

I am facing a problem with AddInExpress version 10.2.4714.0.

Initially we were using 9.4.4644.0. Then I didn't had any issues. Now we upgraded to 10.2.4714.0.

My machine is a 64 Bit Windows 2019 Data center and My excel was 32 bit.

While executing the line of code for opening the workbook, I am getting a null reference on AddInModule.CurrentInstance.


Private exl As InteropExcel.Application
.
.
.
exl.Application.Workbooks.Open(sFileName)


When I run this code, I am getting null reference from the below line.


public partial class AddinModule : AddinExpress.MSO.ADXAddinModule
    {
public static new AddinModule CurrentInstance
        {
            get
            {
                var instance = AddinExpress.MSO.ADXAddinModule.CurrentInstance;
                Debug.Assert(instance != null);
                return (AddinModule)instance;
            }
        }
}


When I inspect it, I can see that the CurrentInstance is null.
This code is working fine when I remove 32 bit excel and install 64 bit excel.
Could you please provide a way to make it work in both 32 and 64 bit excel applications?
Posted 07 May, 2025 05:29:32 Top
Andrei Smolin


Add-in Express team


Posts: 19169
Joined: 2006-05-11
Hello Jyothish,

I'm terribly sorry for not responding on time: I guess I overlooked your post somehow.

Does the issue persist?

Regards from Poland (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 28 May, 2025 13:46:49 Top
Jyothish M B




Posts: 2
Joined: 2025-05-07
Hi,

Yes. Issue is still there.

32 bit excel not working.
Posted 28 May, 2025 13:56:01 Top
Andrei Smolin


Add-in Express team


Posts: 19169
Joined: 2006-05-11
Hello Jyothish,

Is your add-in project built for the Any CPU platform? I suggest that you check if your add-in project and setup project follow the steps we describe in section Deploying a per-user Office extension via an MSI installer; see the PDF file in the folder {Add-in Express}\Docs on your development PC. If your add-in is per-machine, check section Deploying a per-machine Office extension via an MSI installer.

Regards from Poland (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 30 May, 2025 10:35:17 Top
Andrei Smolin


Add-in Express team


Posts: 19169
Joined: 2006-05-11
Hello Jyothish,

Anything for me?

Regards from Poland (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 03 Jun, 2025 18:20:09 Top