Excel De-Active and Active events are not getting fired after clicking on an inactive document CLOSE button.

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

Excel De-Active and Active events are not getting fired after clicking on an inactive document CLOSE button.
Excel De-Active and Active events are not getting fired after clicking on an inactive document CLOSE button. 
css@factset.com


Guest


We are using .net Add-in expresses for office plugins. We got a severe issue where excel properties got replaced with other excel document.

I observed Excel De-Active and Active events are not getting fired after clicking on an inactive document CLOSE button.

Steps to Reproduce.

Open two excel's

Update excel-1
update excel-2
now click on the close button of inactive excel-1, excel asks for want to save the changes

Only excel-1 WorkbookBeforeClose event fired.

Expected
Because I clicked on Inactive excel-1, it should first fire
Excel-2 WorkbookDeactivate event
Excel-1 WorkbookActivate event, then
Excel-1 WorkbookBeforeClose

Could you please let me know, how to fix this

Thanks
Raj
Posted 13 Sep, 2019 05:17:15 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hello Raj,

There's no way to fix this. This is Excel who fires the events and defines their order. Add-in Express just translates these events to the events of the corresponding component.


Andrei Smolin
Add-in Express Team Leader
Posted 16 Sep, 2019 04:27:21 Top
css@factset.com


Guest


Hello Andrei,

Thanks for the response. The issue is not about the Excel events order.

Excel Save is happening without firing Active event. I think that shouldn't be the case in general. Can we check with excel support team and see if there is a way to fix this.

Thanks
Raj
Posted 16 Sep, 2019 09:50:39 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hello Raj,

You can. I suppose you'll need to create a support case with Microsoft and discuss the issue with them. Still, they may argue that this behavior is expected; I'm not sure they will argue, I simply suppose this. Ideally, you would need to have a really simple sample, preferably created by Microsoft itself: if that sample works incorrectly, that would be a real proof of a bug in their code. I suggest that you use VBA macros or a VSTO add-in.


Andrei Smolin
Add-in Express Team Leader
Posted 16 Sep, 2019 10:18:05 Top