Hi John
It's my understanding that you can't use LoadCustomUI to reload a ribbon with the same name as one already loaded. That means you can't tweak the XML and reload it to see the changes. Is that also your understanding? A way around this is to load the modified ribbon with a unique name – for example "TestRibbon" & Time(). Then set the RibbonName property of a form to the same and open the form.
Note also that you can't change the application ribbon name after the database has been opened. You CAN, however, set it to a ribbon name that doesn't exist in USysRibbons (e.g. "LoadLater"), and then in the application startup code you can decide which XML to load depending in the environment – runtime, admin user, etc – and load the LoadLater ribbon and it will become the application ribbon for that instance.
Best,
Graham
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com]
Sent: Wednesday, 7 June 2017 04:05
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] Testing a ribbon
Art-
You can put your XML in a table named something other than USysRibbons, then open that table in code to fetch the XML and use Application.LoadCustomUI to load and test your Ribbons.
See also chapters 23 and 24 in Microsoft Access 2007 Inside Out.
John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
(Paris, France)
On Jun 6, 2017, at 5:53 PM, dbalorenzini@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
I am currently creating a custom ribbon and I am wondering if there is a better way to test your changes other than closing and opening the database?
Posted by: "Graham Mandeno" <graham@mandeno.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (4) |
Tidak ada komentar:
Posting Komentar