A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Programming
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Hide ribbon or menu bar in Excel 2007



 
 
Thread Tools Display Modes
  #1  
Old January 18th 07, 03:41 PM posted to microsoft.public.excel.programming
Jim Rech
external usenet poster
 
Posts: 2,718
Default Hide ribbon or menu bar in Excel 2007

This totally hides/shows the ribbon:

Sub HideRibbon()
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
End Sub

Sub ShowRibbon()
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",True)"
End Sub

This is probably an oversight by MS since the VBA equivalent does not hide
the ribbon. Now that it's public it may not survive the first SP.

You'd still need to run your code to kill the various context (right-click)
menus.

--
Jim
"Shahin.H" > wrote in message
...
| Hi everybody,
| Does anybody know how to hide ribbon or menu bar in Excel 2007 using VBA
code?
| I applied following solution:
|
| Dim iCounter As Integer
| For iCounter = 1 To CommandBars.Count
| Application.CommandBars(iCounter).Enabled = False
| Next
|
| This code works in Excel 2003, however it does not work in Excel 2007?
|
| I would be very grateful if anybody could help me.
|
| Best regards,
| Shahin
|


Ads
  #2  
Old January 18th 07, 05:28 PM posted to microsoft.public.excel.programming
Jim Cone
external usenet poster
 
Posts: 3,290
Default Hide ribbon or menu bar in Excel 2007

Jim,
MS has already started asking around about killing off xl4 macros.
Maybe toolbar/ribbon control is one of the reasons?
--
Jim Cone
San Francisco, USA


http://www.realezsites.com/bus/primitivesoftware
"Jim Rech" >
wrote in message
This totally hides/shows the ribbon:

Sub HideRibbon()
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
End Sub

Sub ShowRibbon()
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",True)"
End Sub

This is probably an oversight by MS since the VBA equivalent does not hide
the ribbon. Now that it's public it may not survive the first SP.

You'd still need to run your code to kill the various context (right-click)
menus.

--
Jim
"Shahin.H"
>
wrote in message
| Hi everybody,
| Does anybody know how to hide ribbon or menu bar in Excel 2007 using VBA
code?
| I applied following solution:
|
| Dim iCounter As Integer
| For iCounter = 1 To CommandBars.Count
| Application.CommandBars(iCounter).Enabled = False
| Next
|
| This code works in Excel 2003, however it does not work in Excel 2007?|
| I would be very grateful if anybody could help me.|
| Best regards,
| Shahin
|


  #3  
Old January 18th 07, 07:06 PM posted to microsoft.public.excel.programming
Jim Rech
external usenet poster
 
Posts: 2,718
Default Hide ribbon or menu bar in Excel 2007

They've wanted to dump XL4 macros for years just so they don't have to
maintain them. I filed a few bugs on XL4 code for the XL12 beta that they
addressed so it does use up some of their time. The MVPs gave MS a list of
the functionality that is now only available via XL4 code that they'd want
to see added to VBA before killing off XL4. If MS did that, I'd wouldn't be
unhappy to see the end of it, even though I still have some old code to
convert.

--
Jim
"Jim Cone" > wrote in message
...
| Jim,
| MS has already started asking around about killing off xl4 macros.
| Maybe toolbar/ribbon control is one of the reasons?
| --
| Jim Cone
| San Francisco, USA
|
|
| http://www.realezsites.com/bus/primitivesoftware
| "Jim Rech" >
| wrote in message
| This totally hides/shows the ribbon:
|
| Sub HideRibbon()
| Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
| End Sub
|
| Sub ShowRibbon()
| Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",True)"
| End Sub
|
| This is probably an oversight by MS since the VBA equivalent does not hide
| the ribbon. Now that it's public it may not survive the first SP.
|
| You'd still need to run your code to kill the various context
(right-click)
| menus.
|
| --
| Jim
| "Shahin.H"
| >
| wrote in message
|| Hi everybody,
|| Does anybody know how to hide ribbon or menu bar in Excel 2007 using VBA
| code?
|| I applied following solution:
||
|| Dim iCounter As Integer
|| For iCounter = 1 To CommandBars.Count
|| Application.CommandBars(iCounter).Enabled = False
|| Next
||
|| This code works in Excel 2003, however it does not work in Excel 2007?|
|| I would be very grateful if anybody could help me.|
|| Best regards,
|| Shahin
||
|
|


  #4  
Old January 18th 07, 08:59 PM posted to microsoft.public.excel.programming
Jim Cone
external usenet poster
 
Posts: 3,290
Default Hide ribbon or menu bar in Excel 2007

Jim,
Thanks for the overview. At least they are asking this time.
It now may seem silly to most, but dumping "Card File"
from Windows was an irritant to me for a very long time.
Regards,
Jim Cone


"Jim Rech" >
wrote in message

They've wanted to dump XL4 macros for years just so they don't have to
maintain them. I filed a few bugs on XL4 code for the XL12 beta that they
addressed so it does use up some of their time. The MVPs gave MS a list of
the functionality that is now only available via XL4 code that they'd want
to see added to VBA before killing off XL4. If MS did that, I'd wouldn't be
unhappy to see the end of it, even though I still have some old code to
convert.

--
Jim
"Jim Cone" > wrote in message
...
| Jim,
| MS has already started asking around about killing off xl4 macros.
| Maybe toolbar/ribbon control is one of the reasons?
| --
| Jim Cone
| San Francisco, USA
|
|
| http://www.realezsites.com/bus/primitivesoftware
| "Jim Rech" >
| wrote in message
| This totally hides/shows the ribbon:
|
| Sub HideRibbon()
| Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
| End Sub
|
| Sub ShowRibbon()
| Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",True)"
| End Sub
|
| This is probably an oversight by MS since the VBA equivalent does not hide
| the ribbon. Now that it's public it may not survive the first SP.
|
| You'd still need to run your code to kill the various context
(right-click)
| menus.
|
| --
| Jim
| "Shahin.H"
| >
| wrote in message
|| Hi everybody,
|| Does anybody know how to hide ribbon or menu bar in Excel 2007 using VBA
| code?
|| I applied following solution:
||
|| Dim iCounter As Integer
|| For iCounter = 1 To CommandBars.Count
|| Application.CommandBars(iCounter).Enabled = False
|| Next
||
|| This code works in Excel 2003, however it does not work in Excel 2007?|
|| I would be very grateful if anybody could help me.|
|| Best regards,
|| Shahin
||
|
|


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Excel 2007 Ribbon Ayo Setting up and Configuration of Excel 2 November 6th 09 06:13 AM
Excel 2007 Ribbon Annette[_3_] Excel Discussion (Misc queries) 4 August 25th 09 02:39 PM
Excel 2007 Ribbon Clay Excel Worksheet Functions 2 September 3rd 08 09:51 AM
How can I add the OneNote 2007 icon to the ribbon in Excel 2007? Todd Excel Discussion (Misc queries) 6 February 15th 08 12:22 AM
Help! Excel 2007 Ribbon Is Missing Add-Ins Tab Ash Excel Discussion (Misc queries) 2 January 5th 08 10:17 PM


All times are GMT +1. The time now is 07:01 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 2004-2014 ExcelBanter.
The comments are property of their posters.