You are here: 19
How to identify the Ribbon state?
19
How to identify the Ribbon state? 
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:
[HKEY_CURRENT_USER]\Software\Microsoft\Office\1x.0\Common\Toolbars\Access
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"