M
Mousam
Hi All,
I am developing a COM add in in C++ for Excel.
I want to know if there is any way to know that a particular workbook
has been closed. There is an event 'WorkbookBeforeClose' of
application object, but it gets fired before the workbook is going to
close and I can not do my operations in its event handler because its
not sure that workbook will be closed after the 'WorkbookBeforeClose'
event gets fired.
Actually in my add in for some reason I am keeping a collection of all
open workbooks. Idea is that in 'NewWorkbook' event of application
object I add newly added workbook to my collection and when workbook
gets close then deletes the closed workbook from my collection.
Definitely I can not achieve this by deleting the workbook from
collection in 'WorkbookBeforeClose' event as at this point I am not
sure whether the workbook will be closed or not.
Is there any better way to achieve the desired functionality?
looking for some positive response.
Thanks & Regards,
Mousam Dubey
I am developing a COM add in in C++ for Excel.
I want to know if there is any way to know that a particular workbook
has been closed. There is an event 'WorkbookBeforeClose' of
application object, but it gets fired before the workbook is going to
close and I can not do my operations in its event handler because its
not sure that workbook will be closed after the 'WorkbookBeforeClose'
event gets fired.
Actually in my add in for some reason I am keeping a collection of all
open workbooks. Idea is that in 'NewWorkbook' event of application
object I add newly added workbook to my collection and when workbook
gets close then deletes the closed workbook from my collection.
Definitely I can not achieve this by deleting the workbook from
collection in 'WorkbookBeforeClose' event as at this point I am not
sure whether the workbook will be closed or not.
Is there any better way to achieve the desired functionality?
looking for some positive response.
Thanks & Regards,
Mousam Dubey