excel vba hide ribbon

The solution for “excel vba hide ribbon” can be found here. The following code will assist you in solving the problem.

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

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

Similar Posts