none
Excel Ctrl+Tab order is affected by VSTO add-in RRS feed

  • Question

  • Hi,

    I am new to VSTO development. Recently I have developed an Excel add-in, with VSTO, which comprises an action pane with several textboxes for users to input. This add-in runs successfully. But there is one issue discovered with the order of workbook switching via View>Switch Windows.

    Originally, the order of workbook switching is sequential. A>B>C>A>B>C. However, if I start the add-in in the same Excel application, the order of workbook switching will be A>add-in>B>add-in>C>add-in>A>add-in. The add-in sheet is always the next one to come out.

    Is it a known issue for VSTO? Are there ways to change it to sequential just like normal?

    Thanks, Gary

    Thursday, August 6, 2015 2:16 AM

Answers

  • Hi,

    After more checks, I found my issue was caused by the overriding of

    this.Application.WorkbookActivate



    Whenever Ctrl+Tab is pressed, WorkbookActivate is triggered to show my add-in page; thus changing the default switching sequence of workbooks.

    Thanks, Gary

     
    Monday, August 10, 2015 8:18 AM

All replies

  • Hi Gary,

    I am trying to reproduce the issue in Excel 2013 however failed. Based on my test, the order for window switch is opposite to the order of opening. For example, I opened the workbook like workbook1, workbook2, workbook3. The order for the switching window is like below:
    1. workbook3

    2. workbook2

    3. workbook1

    Then we open a wrokbook customization name workbook4 then neww order for the switching window would be like below:

    1. workbook4
    2. workbook3
    3. workbook2
    4. workbook1

    You can always check the order for the switching window like figure below:

    Hope it is helpful.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Friday, August 7, 2015 6:15 AM
    Moderator
  • Hi Gary

    Perhaps if you could upload a (test) solution as a zipped file to OneDrive or something similar that reproduces the problem?


    Cindy Meister, VSTO/Word MVP, my blog

    Friday, August 7, 2015 3:00 PM
    Moderator
  • Hi,

    After more checks, I found my issue was caused by the overriding of

    this.Application.WorkbookActivate



    Whenever Ctrl+Tab is pressed, WorkbookActivate is triggered to show my add-in page; thus changing the default switching sequence of workbooks.

    Thanks, Gary

     
    Monday, August 10, 2015 8:18 AM
  • Hi Gary

    Thanks for letting us know :-)


    Cindy Meister, VSTO/Word MVP, my blog

    Monday, August 10, 2015 3:38 PM
    Moderator