How to identify the Ribbon state? FAQ Link

With following code you can identify the Ribbon state:

Function RibbonState() As Long
'Result: 0=normal, -1=autohide
    RibbonState = (CommandBars("Ribbon").Controls(1).Height < 100)
End Function

Thanks to Sascha Trowitzsch: http://www.mosstools.de/

Or you can read the registry:


Value Name:     QuickAccessToolbarStyle
Value Data:      0      (ribbon = normal)
Value Data:      4      (ribbon = autohide)


This Sample Database shows how to set the Ribbon state by VBA.  

In Access 2010 you can change the Ribbon state with:

   CommandBars.ExecuteMso "MinimizeRibbon"