Whole excel ribbon 'Freezes' when programmatically opening a file

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

Whole excel ribbon 'Freezes' when programmatically opening a file
 
Anthony Pitts




Posts: 4
Joined: 2016-08-26
Hi,

When programmatically opening a new xlsx file via the below method, the whole ribbon becomes frozen (un-clickable) until deactivate and reactivate the newly opened Excel instance. After that, the ribbon works as it should.


var workbooks = ExcelApp.Workbooks;
var workbook = workbooks.Open(filename);

Marshal.ReleaseComObject(workbooks);
Marshal.ReleaseComObject(workbook);


As I've only been using Addin Express for a week, my best guess is that it's either that I'm not releasing a COM object related to the Addin Module or Ribbon itself, or maybe I'm not using the correct method to open a file.

Thanks in advance.
Posted 02 Sep, 2016 18:56:32 Top
Anthony Pitts




Posts: 4
Joined: 2016-08-26
I've figured out the problem. It was due to leaving a manually created dialog window open while opening the new file. Closing the dialog before calling workbooks.Open(filename) was the fix.
Posted 04 Sep, 2016 18:20:51 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Thank you for posting your findings here!


Andrei Smolin
Add-in Express Team Leader
Posted 05 Sep, 2016 05:43:48 Top