Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detect if Ribbon Minimized or Maximized 1

Status
Not open for further replies.

TheAceMan1

Programmer
Sep 23, 2003
11,174
0
36
US
Howdy All,

I can minimize the ribbon (win11) with the following:
CommandBars.ExecuteMso "MinimizeRibbon"

The problem is successive executions of the code simply toggle the ribbon. Currently looking for code that reveals wether the ribbon is minimized or not.

Any suggestions?

See Ya . . .

Be sure to see FAQ219-2884 Worthy Reading! [thumbsup2]
Also FAQ181-2886 Worthy Reading! [thumbsup2]
 
Use [tt]Application.CommandBars("Ribbon").Height[/tt] to determine if the Ribbon is minimised or not. I'm not providing values as they may differ on your PC, but the minimised height is less than the 'maximised' height (in my case the values for Excel happen to be 81 and 196 respectively).

(note that I have a vague feeling that this doesn't this work in versions earlier than Office 2013
 
OK strongm ...

Looks good. I'll probably tickle minimize/maximize and store the values on open of the workbook.

Much appreciated!

See Ya . . .

Be sure to see FAQ219-2884 Worthy Reading! [thumbsup2]
Also FAQ181-2886 Worthy Reading! [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top