Hi Chris and thanks for the answer.
You are right, macros cannot be executed when they are disabled, but the dotNet instantiated Excel objects are still valid, so my question was :
Are their any means, with all available Excel objects in my dotNet addin (not by calling a macro), to know whether macro can be executed or not?
A possible solution will be to call a macro and catch the "Macro disabled" exception (H800A03EC), but I think that checking an Excel object property will be more convenient.
Thanks anyway.
Main Topics
Browse All Topics





by: chris_bottomleyPosted on 2009-06-18 at 06:10:46ID: 24657000
>>> How can I detect if macros can be excecuted when the workbook activate event is fired and handle when the user allow/disallow macros executions?
Basically you can't as by nature the macros are disabled and therefore there is no means to interrogate excel. I would expect that you need to implement your error handling to handle the exception.
Chris