Results 1 to 4 of 4

Thread: Hide tabs and ribbon in Excel with VBA
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Oct 2019
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Hide tabs and ribbon in Excel with VBA

    Hi
    I wonder how to autohide the ribbon and tabs with VBA

    Bengt

  2. #2
    Board Regular Jaafar Tribak's Avatar
    Join Date
    Dec 2002
    Location
    Larache--Morocco
    Posts
    7,391
    Post Thanks / Like
    Mentioned
    40 Post(s)
    Tagged
    3 Thread(s)

    Default Re: Hide tabs and ribbon in Excel with VBA

    Quote Originally Posted by Bengan View Post
    Hi
    I wonder how to autohide the ribbon and tabs with VBA

    Bengt
    One way :
    Code:
    Sub ShowRibbon(ByVal Show As Boolean)
      Application.ExecuteExcel4Macro "Show.ToolBar(""Ribbon""," & Show & ")"
    End Sub
    Then to hide it :
    Code:
    Sub Test()
        Call ShowRibbon(False)
    End Sub
    To show it:
    Code:
    Sub Test()
        Call ShowRibbon(True)
    End Sub
    Office/Excel 2010 64Bits -- Win10 64Bits

    Common sense is not so common.


    http://photo-larache.blogspot.com/

  3. #3
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    29,120
    Post Thanks / Like
    Mentioned
    483 Post(s)
    Tagged
    49 Thread(s)

    Default Re: Hide tabs and ribbon in Excel with VBA

    Cross posted https://www.excelforum.com/excel-pro...using-vba.html

    While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
    This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  4. #4
    Board Regular Jaafar Tribak's Avatar
    Join Date
    Dec 2002
    Location
    Larache--Morocco
    Posts
    7,391
    Post Thanks / Like
    Mentioned
    40 Post(s)
    Tagged
    3 Thread(s)

    Default Re: Hide tabs and ribbon in Excel with VBA

    If you mean Auto-Hiding then

    Code:
    Sub AutoHideRibbon()
        Application.CommandBars.ExecuteMso "HideRibbon"
    End Sub
    Office/Excel 2010 64Bits -- Win10 64Bits

    Common sense is not so common.


    http://photo-larache.blogspot.com/

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •