|
|
Ленты (Ribbons) - Сворачивание
Public Sub SetRibbonState(Optional blnShowRibbon As Boolean, Optional blnHeightOnly As Boolean)
Application.Echo False
If blnShowRibbon Then
If blnHeightOnly Then
If CommandBars("Ribbon").Controls(1).Height < 99 Then
Application.CommandBars.ExecuteMso "MaximizeRibbon"
End If
Else
DoCmd.ShowToolbar "Ribbon", acToolbarYes
If CommandBars("Ribbon").Controls(1).Height > 99 Then
Application.CommandBars.ExecuteMso "MaximizeRibbon"
End If
End If
Else
If blnHeightOnly Then
If CommandBars("Ribbon").Controls(1).Height > 99 Then
Application.CommandBars.ExecuteMso "MinimizeRibbon"
End If
Else
DoCmd.ShowToolbar "Ribbon", acToolbarNo
End If
End If
Application.Echo True
End Sub
|
|