Disabling Ribbon in '07

R

Risky Dave

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
 
O

Orion Cochrane

Make a Workbook_Activate event that calls Workbook_Open and a
Workbook_Deactivate event that reverses your Workbook_Open event. This should
work.
 
R

Risky Dave

Perfect! My thanks

Orion Cochrane said:
Make a Workbook_Activate event that calls Workbook_Open and a
Workbook_Deactivate event that reverses your Workbook_Open event. This should
work.
 
O

Orion Cochrane

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top