none
Display Pane (user control) in active workbook RRS feed

  • Question

  • I have an Excel VSTO C# Add-in project. I have a toggle button in a ribbon that I want to use to show a task pane control (user control) in the active workbook.

    When I initially open Excel 2019 with workbook "Book1", the task pane shows up in the correct place when I click the "toggleButton1" button.

    But if I click new workbook, my new workbook "Book2" inherits the settings from the first workbook (the toggle button is checked)

    The end result is that when I click the toggle button in "Book2", the pane in "Book1" gets hidden. What I would like is that "Book2" does not inherit the settings of "Book1" so that when I click on "toggleButton1" in "Book2" a new "MyCustomTaskPane" appears in "Book2".

    I based my simple ribbon/panel project on this walk through

    https://docs.microsoft.com/en-us/visualstudio/vsto/walkthrough-synchronizing-a-custom-task-pane-with-a-ribbon-button?view=vs-2019

    How do I get a "new" ribbon instance (that doesn't inherit the actions from "Book1") when I open a new workbook? Will that ensure that my panel opens in the active workbook?

    Thanks
    Thursday, May 23, 2019 4:09 PM