If Application.CommandBars.GetPressedMso("MinimizeRibbon") = True Then
Application.CommandBars.ExecuteMso "MinimizeRibbon"
End If