Worksheet Activate event is not firing
On a fine day, I found that custom task pane is not appearing on activating a worksheet. I could find no error messages in our log4net log and windows logs. I tried to troubleshoot for a while but nothing worked.
Finally, I went back my stable project and started comparing the code. It's found that the following line was commented out.
Globals.Factory.GetVstoObject(projectPlanSheet);
As soon as I have removed the comments and task pane showed up again.
I found that GetVstoObject() generates an extended object which gives access to application level events. Also, check out HasVstoObject().
A short description about extended object
References:
Finally, I went back my stable project and started comparing the code. It's found that the following line was commented out.
Globals.Factory.GetVstoObject(projectPlanSheet);
As soon as I have removed the comments and task pane showed up again.
I found that GetVstoObject() generates an extended object which gives access to application level events. Also, check out HasVstoObject().
A short description about extended object
- Add managed controls to any open document or worksheet
- Convert an existing list object on an Excel worksheet to an extended ListObject that exposes events and can be bound to data by using the Windows Forms data binding model
- Access application-level events that are exposed by Word and Excel for specific documents, workbooks, and worksheets
References:
Comments
Post a Comment
Feedback - positive or negative is welcome.