ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Minimising the Ribbon in an Auto_Open macro (https://www.excelbanter.com/excel-discussion-misc-queries/186803-minimising-ribbon-auto_open-macro.html)

Jeff Wiggins

Minimising the Ribbon in an Auto_Open macro
 
Hi,

I am trying to get an Auto_Open macro to minimise the ribbon in Excel 2007,
but the Ctrl+F1 won't appear in the macro.
Can someone please let me know what I am doing wrong ?
--
Thanks in advance,
Jeff

Rick Rothstein \(MVP - VB\)[_410_]

Minimising the Ribbon in an Auto_Open macro
 
Minimize the Ribbon? Do you mean *hide* the Ribbon? If you execute this
line...

ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"", False)"

in the Workbook_Open event, and if the user Enables Macros, then the Ribbon
will be *hidden* at startup. If you ever want to bring it back via code,
change the False to True.

Rick


"Jeff Wiggins" wrote in message
...
Hi,

I am trying to get an Auto_Open macro to minimise the ribbon in Excel
2007,
but the Ctrl+F1 won't appear in the macro.
Can someone please let me know what I am doing wrong ?
--
Thanks in advance,
Jeff



Jeff Wiggins

Minimising the Ribbon in an Auto_Open macro
 
Thanks Rick,

I'm a self taught 'exceller' so I was having a bit of trouble. It works well.

Much appreciated. Jeff (Australia)
--

"Rick Rothstein (MVP - VB)" wrote:

Minimize the Ribbon? Do you mean *hide* the Ribbon? If you execute this
line...

ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"", False)"

in the Workbook_Open event, and if the user Enables Macros, then the Ribbon
will be *hidden* at startup. If you ever want to bring it back via code,
change the False to True.

Rick


"Jeff Wiggins" wrote in message
...
Hi,

I am trying to get an Auto_Open macro to minimise the ribbon in Excel
2007,
but the Ctrl+F1 won't appear in the macro.
Can someone please let me know what I am doing wrong ?
--
Thanks in advance,
Jeff




Ron de Bruin

Minimising the Ribbon in an Auto_Open macro
 
You can also Use XML

See this page for a example
http://www.rondebruin.nl/ribbon.htm

In the XML examples (number 2)
you can find a dictator example


<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"


<!-- ************************************************** ************************--
<!-- ****Disable 'Exit Excel' and 'Excel Options' on the Office button menu****--
<!-- ************************************************** ************************--

<commands
<!-- Disable Excel Options on the Office button menu--
<command idMso="ApplicationOptionsDialog" enabled="false"/

<!-- Disable Exit Excel on the Office button menu--
<command idMso="FileExit" enabled="false"/
</commands



<!-- ************************************************** *****************--
<!-- **********Set startFromScratch to true to hide the ribbon**********--
<!-- **********Hide New, Open and Save on the Office button menu********--
<!-- ************************************************** *****************--


<!-- Set startFromScratch to true to hide the ribbon--
<ribbon startFromScratch="true"

<!-- startFromScratch="true" hides all of the ribbon tabs and it hides the QAT. --
<!-- It also hides most of the commands on the Office button menu, but for some --
<!-- reason, it does not hide the 'New', 'Open' and 'Save' commands. --
<!-- So if you want to hide them you have to add this to your RibbonX file: --

<officeMenu
<button idMso="FileNew" visible="false"/
<button idMso="FileOpen" visible="false"/
<button idMso="FileSave" visible="false" /
</officeMenu

<!-- You can add xml here to create your own custom tab on the ribbon--

</ribbon


</customUI



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Rick Rothstein (MVP - VB)" wrote in message ...
Minimize the Ribbon? Do you mean *hide* the Ribbon? If you execute this
line...

ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"", False)"

in the Workbook_Open event, and if the user Enables Macros, then the Ribbon
will be *hidden* at startup. If you ever want to bring it back via code,
change the False to True.

Rick


"Jeff Wiggins" wrote in message
...
Hi,

I am trying to get an Auto_Open macro to minimise the ribbon in Excel
2007,
but the Ctrl+F1 won't appear in the macro.
Can someone please let me know what I am doing wrong ?
--
Thanks in advance,
Jeff




All times are GMT +1. The time now is 03:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com