Reseting the ribbon visiblity in 2007

DCrake

Remembered
Local time
Today, 10:15
Joined
Jun 8, 2005
Messages
8,626
Ok, so now I have been playing with a ribbon menu in 2007, somewhat frustratingly as it does not show any syntax errors but fails to load when the app is opened. However that is not my issue. My problem is that I am using

<ribbon startFromScratch="false">

in my USysRibbons table to hide the Access Ribbon on load of the application. This works fine. But whilst developing I want the ribbon to be there for obvious reasons. How do I restore the ribbon back when I close my main form?
 
I have yet to attempt to customize a ribbon but here are the commands I use to show or hide the ribbon...

Code:
DoCmd.ShowToolbar "Ribbon", acToolbarYes
DoCmd.ShowToolbar "Ribbon", acToolbarNo
 
When you use a custom XML without any callbacks, it's static and thus no way to manage visibility. You can do:

1) Remember to hold down the shift key and thus suppress any custom ribbon loading.
2) Add a OnLoad callback to grab hold of ribbon object in VBA then manage its visibility via VBA, or dynamically load a different XML depending on context.
3) Create another custom XML for developer and use that for your purpose then change before distributing.
 

Users who are viewing this thread

Back
Top Bottom