[AccessD] A2012 Ribbon collapse (not hide) from code

Gustav Brock gustav at cactus.dk
Fri Feb 8 06:39:19 CST 2013


Hi Stuart

Thanks. So did I. Searched for minimize instead of collapse and found by
Albert D. Kallal:

http://social.msdn.microsoft.com/Forums/en-US/accessdev/thread/f8e6397f-fb63
-4508-a64c-5119303dce31

Now, the big question is how to maximize it when minimized??
This is where the intuitive part comes in. I tried, of course, with all the
obvious variations - then returned to the thread and browsed to the bottom:

<quote>
If I use the same line of code to hide the ribbon in the OnClose property,
the ribbon is restored.  Not completely intuitive, I think, that minimizing
something that's minimized results in something maximized.
</quote>

You gotta love that kind of logic.
Time for Friday beer and weekend.

/gustav

-----Oprindelig meddelelse-----
Fra: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] På vegne af Stuart McLachlan
Sendt: 8. februar 2013 13:06
Til: Access Developers discussion and problem solving
Emne: Re: [AccessD] A2012 Ribbon collapse (not hide) from code

Just discovered, Access 2010:

CommandBars.ExecuteMso "MinimizeRibbon"

--
Stuart

On 8 Feb 2013 at 22:00, Stuart McLachlan wrote:

> 2007/10   I'm guessing it will work in 2012:
> 
> A real kludge, but I've never found an alternative. 
> 
> If CommandBars("ribbon").Height > 100 Then SendKeys "^{F1}", True End 
> If
> 
> --
> Stuart
> 
> On 8 Feb 2013 at 11:51, Gustav Brock wrote:
> 
> > Hi all
> > 
> > Is this possible? It's easy to _hide_ , but how to collapse (or
minimize)?
> > Also, client is not interested in custom ribbons; the default is fine. 
> > 
> > /gustav






More information about the AccessD mailing list