View Full Version : [SOLVED:] Ribbon management in Excel-2007
arrun
07-04-2010, 01:59 PM
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.
Bob Phillips
07-04-2010, 03:30 PM
How are youmaking it invisible, using
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
Just add that code to the workbook activate event, and the converse to the deactivate event.
arrun
07-04-2010, 09:35 PM
Thanks Xld, it is what I wanted
arrun
07-04-2010, 10:33 PM
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:
Private Sub Workbook_Activate()
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
CommandBars("Worksheet Menu Bar").Visible = True
End Sub
However it generates error. Can anyone please tell me what is the correct code?
Thanks,
Bob Phillips
07-05-2010, 12:05 AM
Which menu bar are you referring to? CommandBars("Worksheet Menu Bar") is a 2003 concept not 2007.
arrun
07-05-2010, 10:59 AM
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,
Bob Phillips
07-05-2010, 01:21 PM
I thought that might be what you meant. Unfortunately, those are the ribbon captions, so when the ribbon goes, they go.
khushii
07-06-2010, 02:59 AM
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.
Application.SendKeys ("^{F1}")
Hopefully it should work:)
arrun
07-16-2010, 11:37 AM
Hi khushii thanks for this reply. It is ok, however is there any code which will check whether ribbon is activated or not?
Thanks,
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.