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