Consulting

Results 1 to 9 of 9

Thread: Solved: Ribbon management in Excel-2007

  1. #1

    Solved: Ribbon management in Excel-2007

    Dear all,

    I am using Excel-2007 and need some help on Ribbon management. I want, for some of my excel files the entire Ribbon-bar should be invisible. Currently what is happening is that if I make Ribbon invisible, then it becomes effective for all open excel files, however I want to make it invisible for some of my excel files.

    Is it possible?

    Thanks for your time.

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    How are youmaking it invisible, using

    [vba]

    Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
    [/vba]

    Just add that code to the workbook activate event, and the converse to the deactivate event.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Thanks Xld, it is what I wanted

  4. #4
    Hi Xld, I got another problem. When I execute that code entire menu bar gets missing. Therefore I tried following code to show the menubar but still hide the Ribbon:

    [VBA]Private Sub Workbook_Activate()
    Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
    CommandBars("Worksheet Menu Bar").Visible = True
    End Sub
    [/VBA]
    However it generates error. Can anyone please tell me what is the correct code?

    Thanks,

  5. #5
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Which menu bar are you referring to? CommandBars("Worksheet Menu Bar") is a 2003 concept not 2007.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  6. #6
    Dear Xld, please see the attachment. I make a red circle on what I meant as Menu Bar.............

    Problem is that, when I run above code, this menu bar is also disappearing. How to stop that?

    Thanks,

  7. #7
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    I thought that might be what you meant. Unfortunately, those are the ribbon captions, so when the ribbon goes, they go.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  8. #8

    Lightbulb

    Quote Originally Posted by arrun
    Problem is that, when I run above code, this menu bar is also disappearing. How to stop that?
    hi arrun, I have found another solution for ur problem.instead of making Ribbon Invisible, v need to minimize it so that the Menubar is displayed.

    So try the below code in window activate n deactivate proc.

    [vba] Application.SendKeys ("^{F1}") [/vba]

    Hopefully it should work

  9. #9
    Hi khushii thanks for this reply. It is ok, however is there any code which will check whether ribbon is activated or not?

    Thanks,

Posting Permissions

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