[AccessD] A2007 - Programmatically Minimize Ribbon

William Hindman wdhindman at dejpolsystems.com
Wed Feb 4 21:28:51 CST 2009


"SendKeys"?????????

...shakes head ...returns to A2K3 :(

...sorry Stu, just couldn't help myself :)

William

--------------------------------------------------
From: "Stuart McLachlan" <stuart at lexacorp.com.pg>
Sent: Wednesday, February 04, 2009 10:14 PM
To: "Access Developers discussion and problem solving" 
<accessd at databaseadvisors.com>
Subject: Re: [AccessD] A2007 - Programmatically Minimize Ribbon

> 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
>
>
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 




More information about the AccessD mailing list