none
Application_WorkbookOpen event is not getting fired when excel opens with the default workbook RRS feed

  • Question

  • Hi All,

    I have created a sample excel plugin and I registered a Application_WorkbookOpen event in the addin startup.I want that whenever I start my excel application,it opens with a default workbook.I want to get the workopen event with this blank workbook as the activework book.

    Help will be appreciated.

    Thanks,

    Vin

    Tuesday, December 1, 2015 2:58 PM

Answers

  • >>>I want that whenever I start my excel application,it opens with a default workbook.I want to get the workopen event with this blank workbook as the activework book.

    According to your description, I suggest that you could use WorkbookActivate event to active this default workbook that opened in your excel application, you could refer to below code:

    Application.WorkbookActivate += Application_WorkbookActivate;
    
    void Application_WorkbookActivate(Excel.Workbook Wb)
    {
        ((Excel._Workbook)Application.Workbooks[1]).Activate();
    }
    

    Otherwise could you provide more information about this issue, for example sample code and screen shot etc., that will help us to reproduce and resolve your issue.

    For more information, click here to refer about AppEvents_Event members

    • Marked as answer by David_JunFeng Tuesday, December 15, 2015 1:34 AM
    Wednesday, December 2, 2015 8:03 AM