Answers for "excel vba hide ribbon"

VBA
0

excel vba hide ribbon

Sub test()
'Hide Ribbon if it is on the screen in 2010-2013
If RibbonState = 0 Then CommandBars.ExecuteMso "MinimizeRibbon"
End Sub

Function RibbonState() As Long
'Sascha Trowitzsch: http://www.mosstools.de/
'Result: 0=normal, -1=autohide
    RibbonState = (CommandBars("Ribbon").Controls(1).Height < 100)
End Function
Posted by: Guest on April-20-2022

Code answers related to "VBA"

Browse Popular Code Answers by Language