ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Generating content on the spreadsheet from an Add-on issue (https://www.excelbanter.com/excel-programming/311742-generating-content-spreadsheet-add-issue.html)

Nacho Nachev

Generating content on the spreadsheet from an Add-on issue
 
Hi,

I am creating buttons on a spreadsheet through a C# code from an add-on
module.

The functionality is implemented and works. My problem is that this module
is run at a relatively radom time, so it sometimes bumps into situation when
the active sheet is not available for writing - for example when there is a
modal Excel dialog window open.

My question is: How can I detect such conditions in order to avoid running
my code in such moments? Probably I just need a hint to start from.

Another important information is that my add-on uses separate thread to
access the Excel object.

Thank you for your time,
Nacho





All times are GMT +1. The time now is 02:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com