Ok, I give up... how do I toggle the ribbon with a macro

bob733733

Board Regular
Joined
Oct 11, 2008
Messages
98
Hello,

After 2,364 trys at creating a tiny, little, hardly do nothin, stupid, any 6 year old kid could do it, macro (sendkeys ^ f1 to toggle the Ribbon), and getting 2,364 different error messages, I have bowed my head in shame, drooped my shoulders, put my tail between my legs and come (again) to this fine forum to plead with all the Grand Masters Of The Excel Language to show me how insignificant my difficulty is in creating a tiny, little, hardly do nothing, stupid, any 6 year old kid could do it macro/vb code or whatever to attach to a Button on a spreadsheet.:confused::confused::(

I wish it were 5pm so the Jack Daniels would make some of the pain go away!:biggrin:

Thanks in advance.

Bob

PS, I just started using these little lexicons (I think that is what you call them). They are great!
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Yeah, this is a tricky one. Try:

Code:
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"", False)"

and to bring it back:

Code:
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"", True)"
 
Upvote 0
Iliace
thanks, that worked. Is there anyway I can combine both stmts under one buttton so that one time, it hides the ribbon and the next time it shows it?
 
Upvote 0
Try this...

If Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"", False) Then

Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"", True)

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

End If
 
Upvote 0
I copied and pasted your code into the sub end sub area, but it fails. That being said, it keeps putting a colon after the Else (ie 'Else:).

Trying to figure that one out now.
 
Upvote 0
Code:
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"", " & cstr(Not(Application.commandbars("Ribbon").visible)) & ")"
 
Upvote 0

Forum statistics

Threads
1,215,098
Messages
6,123,082
Members
449,094
Latest member
mystic19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top