ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Disabling Ribbon in '07 (https://www.excelbanter.com/excel-programming/421336-disabling-ribbon-07-a.html)

Risky Dave

Disabling Ribbon in '07
 
Hi,

I have a piece of code that disables the ribbon under Vista in Office '07:

Private Sub Workbook_Open()
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)" '
disables user ribbon functionality
<do other stuff here
end sub()

This works as intended but it also turns off the ribbon in any other
spreadsheets that are open at the same time. Is it possible to turn off the
ribbon only in my spreadsheet?

TIA

Dave

Orion Cochrane

Disabling Ribbon in '07
 
Make a Workbook_Activate event that calls Workbook_Open and a
Workbook_Deactivate event that reverses your Workbook_Open event. This should
work.
--
I am running on Office 2003, unless otherwise stated.


"Risky Dave" wrote:

Hi,

I have a piece of code that disables the ribbon under Vista in Office '07:

Private Sub Workbook_Open()
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)" '
disables user ribbon functionality
<do other stuff here
end sub()

This works as intended but it also turns off the ribbon in any other
spreadsheets that are open at the same time. Is it possible to turn off the
ribbon only in my spreadsheet?

TIA

Dave


Risky Dave

Disabling Ribbon in '07
 
Perfect! My thanks

"Orion Cochrane" wrote:

Make a Workbook_Activate event that calls Workbook_Open and a
Workbook_Deactivate event that reverses your Workbook_Open event. This should
work.
--
I am running on Office 2003, unless otherwise stated.


"Risky Dave" wrote:

Hi,

I have a piece of code that disables the ribbon under Vista in Office '07:

Private Sub Workbook_Open()
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)" '
disables user ribbon functionality
<do other stuff here
end sub()

This works as intended but it also turns off the ribbon in any other
spreadsheets that are open at the same time. Is it possible to turn off the
ribbon only in my spreadsheet?

TIA

Dave


Orion Cochrane

Disabling Ribbon in '07
 
No problem. I know this because when I manipulate the Status Bar, I want the
messages contained to only apply to the specific workbook. Glad to help!
--
I am running on Office 2003, unless otherwise stated.


"Risky Dave" wrote:

Perfect! My thanks

"Orion Cochrane" wrote:

Make a Workbook_Activate event that calls Workbook_Open and a
Workbook_Deactivate event that reverses your Workbook_Open event. This should
work.
--
I am running on Office 2003, unless otherwise stated.


"Risky Dave" wrote:

Hi,

I have a piece of code that disables the ribbon under Vista in Office '07:

Private Sub Workbook_Open()
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)" '
disables user ribbon functionality
<do other stuff here
end sub()

This works as intended but it also turns off the ribbon in any other
spreadsheets that are open at the same time. Is it possible to turn off the
ribbon only in my spreadsheet?

TIA

Dave


Ron de Bruin

Disabling Ribbon in '07
 
Hi Risky

You can also do it without code (with RibbonX)

See
http://www.rondebruin.nl/ribbon.htm

Try one of the dictator examples in section 2

--

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


"Risky Dave" wrote in message ...
Hi,

I have a piece of code that disables the ribbon under Vista in Office '07:

Private Sub Workbook_Open()
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)" '
disables user ribbon functionality
<do other stuff here
end sub()

This works as intended but it also turns off the ribbon in any other
spreadsheets that are open at the same time. Is it possible to turn off the
ribbon only in my spreadsheet?

TIA

Dave



All times are GMT +1. The time now is 05:17 AM.

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