Excel calculation mode changes broken since version 8.3

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

Excel calculation mode changes broken since version 8.3
 
nwein




Posts: 577
Joined: 2011-03-28
If you build https://www.add-in-express.com/creating-addins-blog/2011/12/05/excel-calculation-mode-event/ with ADX 8.3 or 8.4 (at least against Excel 2010 32-bit) you will see that it works only when changing the calculation mode from Auto to Manual. After that you can't change the calculation mode anymore. Internally you can see that calling the SendMessage method in the adxRibbonCommandAutomatic_OnAction and/or adxRibbonCommandExceptTables_OnAction doesn't actually send any message (the AddinModule_OnSendMessage event is not being called) whereas the adxRibbonCommandManual_OnAction and adxRibbonCommandOptionsDialog_OnAction work just fine.
If you run the exact sample with ADX 8.2 (or earlier) everything works fine.

Applying https://www.add-in-express.com/forum/read.php?FID=5&TID=13296&MID=67687#message67687 doesn't help either.

Can you provide a proper working solution for ADX 8.4?
Thanks
Posted 05 Jan, 2017 18:20:45 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hello Nir,

I have just fixed the issues in both C# and VB.NET code samples. I have tested the code against Excel 2010, 2013 and 2016 (all 32-bit), it works correct to me now. You can download the samples either from Andrei's https://www.add-in-express.com/creating-addins-blog/2011/12/05/excel-calculation-mode-event/ or using the direct links below:
https://www.add-in-express.com/files/projects_pub/calculationmodechanged.zip
https://www.add-in-express.com/files/projects_pub/calculationmodechanged-vb.zip
Posted 06 Jan, 2017 06:19:02 Top
nwein




Posts: 577
Joined: 2011-03-28
Thanks Dmitry but are you sure you've updated the files? I'm still getting the exact same behaviour (and as far as I can see the files are identical)
Posted 06 Jan, 2017 10:40:50 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hello Nir,

I have just re-downloaded both archives and can see the updated content. Probably your browser has cached these files. Please try to copy the URL and add a parameter to it, for example ?qwe:
https://www.add-in-express.com/files/projects_pub/calculationmodechanged.zip?qwe
Posted 06 Jan, 2017 11:00:09 Top
nwein




Posts: 577
Joined: 2011-03-28
Ok, I've re-downloaded it and now it works. Is the only change really just increasing the internal message number by a 1000?
i.e. this:
WM_OptionAutomatic = WM_USER + 1001;

Changed to this:
WM_OptionAutomatic = WM_USER + 2001;


Why would you guys change the reserved base user message range?
Posted 06 Jan, 2017 11:20:00 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hello Nir,

We've found out that exactly this message ID and several others were accidentally re-used for internal purposes. In the next build we will make this work correctly.


Andrei Smolin
Add-in Express Team Leader
Posted 09 Jan, 2017 05:27:27 Top
nwein




Posts: 577
Joined: 2011-03-28
It would have helped if it was mentioned in the release notes but at least now it makes sense, thanks.
Posted 09 Jan, 2017 10:33:02 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hello Nir,

Yes, it would be correct.


Andrei Smolin
Add-in Express Team Leader
Posted 10 Jan, 2017 03:34:31 Top