Hide & Show CommandBars/Ribbons in 2007

  • Hi All,

    I am not sure I like Excel 2007 yet, I have been playing around with it all day and while it has some good features, it is hard to fathom in places. I expect it is just a matter of time to get used to it.

    With previous versions of Excel, hiding and un-hiding commandbard and toolbars can be achieved in a number of ways, such as with the code below

    ActiveWindow.DisplayHeadings = False
    Application.DisplayFormulaBar = False
    Dim cbar As CommandBar
    For Each cbar In CommandBars
    If cbar.Enabled And cbar.Type = msoBarTypeNormal Then
    cbar.Visible = False
    End If
    Next cbar
    CommandBars("Worksheet Menu Bar").Enabled = False

    This does not work in Excel 2007, I have tried many methods but all seem to be redundant in 2007 - appreciate any help



    But I always say luck is where preparation meets opportunity (Justin Langer 23/11/01)

  • Re: Commandbars/toolbars 2007

    GrahamB, yes please understand the concept of forums is not to help individuals, but rather a whole community of Excel users. I have added the link for you, next time please consider others.

  • Re: Hide & Show CommandBars/Ribbons in 2007

    Hiding Commandbars in versions earlier than 2007 can cause problems - if Excel crashes, or the code does not return all the commandbars to the original. Doing so in 2007 may be even more frustarting. I chose to not try to hide any other tabs but to create my own, unfortunately it took quite some time to manage this & it simply is not possible to explain on a Forum.

  • Re: Hide & Show CommandBars/Ribbons in 2007


    I agree with your frustration, however, given that most endusers like to play with programs to see what makes them tick (and I do this myself) means the programs can be corrupted if certain things are not 'protected'.

    With Excel 2007, I will use this code (and for those that are interested, please note there a two routines, the 2nd is to return the displays to the original format)

    This is very simple and does not secure the ribbon, all that is required is to double click on the title bar and it all reappears.

    It is a start to my learning the new ways of Excel 2007, hopefully it wont hurt the brain too much...



    But I always say luck is where preparation meets opportunity (Justin Langer 23/11/01)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!