Getting current instance of task pane returns null

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

Getting current instance of task pane returns null
 
Andrei Smolin


Add-in Express team


Posts: 14106
Joined: 2006-05-11
Hello Sean,

Yes, I believe it may be of help. But let's check the things below first.

After you open the book for the first time and close Excel, before you open the book for the second time, is there an EXCEL.EXE hanging in processes?

Open the workbook for the first time, make sure that the task pane doesn't open, open a new workbook, close it, and check if the task pane opens now.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 30 Mar, 2017 07:30:50 Top
Andrei Smolin


Add-in Express team


Posts: 14106
Joined: 2006-05-11
Also you can check if the collection below contains any task pane instance:

private void adxRibbonButton1_OnClick(object sender, IRibbonControl control, bool pressed) {
    System.Collections.SortedList instances = null;
    instances = this.adxTaskPane1.GetType().InvokeMember("instances", 
        System.Reflection.BindingFlags.GetField | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic, 
        null, this.adxTaskPane1, null) as System.Collections.SortedList;
    System.Windows.Forms.MessageBox.Show(instances.Count.ToString());
}


Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 30 Mar, 2017 08:18:52 Top