none
VSTO- Excel Event to capture a click from taskbar on the workbook RRS feed

  • Question

  • I am working on the VSTO excel 2007 workbook application & looking for an event which tracks the click on excel application from the task bar.

    There are 2 scenarios:-

      • User coming on the excel after clicking excel icon from the task bar.
      • User coming on the excel sheet after Pressing ALT+TAB

    So i need an event which will be fired when user's focus is coming on the excel workbook.

    I have tried events like

     ThisWorkbook_ActivateEvent();

    and

    this.Application.WindowActivate

    but they doesn't seem to be working.

    ref. Image

    Monday, October 15, 2012 7:03 AM

Answers

  • Hi Sangram27,

    Thanks for posting in the MSDN Forum.

    Based on your issue, I would suggest you use the Workbook.WindowActivate Event because you are working on an Excel workbook appilcaition. The Application.WindowActivate event works on an application-level add-ins as usual. So please try the Workbook.WindowActivate event.

    Hope it helps.

    If there is any progress, please don't hesitate to let me know.

    Have a nice day.


    Leo_Gao [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, October 16, 2012 3:13 AM
    Moderator