[AccessD] A2007 - Programmatically Minimize Ribbon

Stuart McLachlan stuart at lexacorp.com.pg
Wed Feb 4 22:14:58 CST 2009


Yep, it's a real kludge, but it's the only one we could find to programmatically control that 
f*ing ribbon :-(


On 4 Feb 2009 at 22:28, William Hindman wrote:

> "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
> > 
> 
> -- 
> 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