none
Hide/Show Excel Ribbon Tab RRS feed

  • Question

  • Hi... I'am building an Excel Workbook with a Custom Ribbon, I have a custom tab "Tab2" and it's Visible property is set to False. I have a button on "Tab1" and i would like to click it and the code would show "Tab2" and activate it. Here is the code i have now and it's NOT working. Kindly note that the code is in the ribbon class Thank you in advance...:) ' ' ' Visual Studio 2015 + Excel 2016 x64 Developer ' ' Private Sub Button6_Click(sender As Object, e As RibbonControlEventArgs) Handles Button66.Click Tab2.Visible = True End Sub
    • Edited by A.Sharaf Monday, May 22, 2017 9:26 AM
    Monday, May 22, 2017 9:25 AM

All replies

  • Hello,

    The code works fine for me. I suggest you add a breakpoint to debug your project.

    Besides, if there is no control in the tab, Office would hide it by default.

    if you hide tab2 in customize ribbon interface, tab2 will be hidden whatever it's visible is, do you set this?

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, May 23, 2017 7:38 AM
    Moderator
  • Is this resolved?

    I am facing the same issue, specifically with Excel 2016; was working with Excel 2013

    Tuesday, December 26, 2017 12:37 PM