Stuart McLachlan
stuart at lexacorp.com.pg
Wed Feb 4 21:14:48 CST 2009
Rocky!
This was answered two months ago when you asked about "turning off the ribbons
programmatically"
Here's what I posted then:
My Height was slightly different to those in the link, probably because of different screen
resolutions, fonts etc but it looks like it will always be above/below 100 so this should work
anywhere. It certainly works for me:
Function RibbonMinimized() As Boolean
RibbonMinimized = Application.CommandBars("Ribbon").Height < 100
End Function
The following four functions give you full control over the Ribbon :-)
Function HideRibbon()
DoCmd.ShowToolbar "Ribbon", acToolbarNo
End Function
Function ShowRibbon()
DoCmd.ShowToolbar "Ribbon", acToolbarYes
End Function
Function MinimizeRibbon()
If Not RibbonMinimized Then SendKeys "^{F1}"
End If
End Function
Function MaximizeRibbon()
If RibbonMinimized Then SendKeys "^{F1}"
End If
End Function