By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,779 Members | 1,309 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,779 IT Pros & Developers. It's quick & easy.

How do I Set a Descripition to a Button on my Ribbon

P: 1
I have new ribbon, that has a few buttons.
How am I add descripition to the new buttons I add?
Mar 7 '12 #1
Share this Question
Share on Google+
6 Replies

Expert Mod 15k+
P: 31,489
I don't have ribbons as I still use 2003, but whoever considers answering this question will need to know if you are creating the ribbon via the interface or code.
Mar 8 '12 #2

P: 25
I do not believe there is an interface for creating a ribbon in Access 2007. I use the system table ‘USysRibbons’ method of loading ribbons, described in this link
I am guessing by description you mean label. the XML code for creating a button with a label is
Expand|Select|Wrap|Line Numbers
  1. <button id="MybuttonID" label="My Label" screentip="My Screen Tip" onAction="MyOnActionButton"/>
Mar 8 '12 #3

Expert Mod 15k+
P: 31,489
As you've provided the XML code, maybe you'd like to explain how it's used. It's not typical (in my experience) to use XML when developing in VBA.
Mar 8 '12 #4

Expert Mod 2.5K+
P: 2,545
@NeoPa, customising the ribbon is done in XML, and is far from a simple task - and nor is it something straightforward to explain.

This MSDN article is an introduction to Customising the Fluent Ribbon.

Mar 8 '12 #5

Expert 5K+
P: 8,636
  1. The USysRibbons Table must be created and consist of at least the following 3 Fields:
    1. [ID] - AutoNumber - LONG
    2. RibbonName - TEXT {255}
    3. RibbonXML - MEMO
  2. The XML Code is dumped initp the RibbonXML Field like so:
    Expand|Select|Wrap|Line Numbers
    1. <customUI xmlns="">
    2.   <ribbon startFromScratch="false">
    3.     <tabs>
    4.       <tab idMso="TabCreate" visible="false" />
    5.       <tab id="dbCustomTab" label="A Custom Tab" visible="true">
    6.         <group id="dbCustomGroup" label="A Custom Group">
    7.           <control idMso="Paste" label="Built-in Paste" enabled="true"/>
    8.         </group>
    9.       </tab>
    10.     </tabs>
    11.   </ribbon>
    12. </customUI>
  3. The XML Code first instructs Access not to 'start from scratch' — that is, it specifies that Access should display the default Ribbon Tabs. Then, it tells Access to hide just one of the default Tabs (the Create tab). Finally, it creates a new Ribbon Tab named 'A Custom Tab', adds a Command Group named 'A Custom Group' to the Tab, and adds the Paste command to the Group.
  4. Close the USysRibbons Table, and then close and reopen the Database.
Mar 8 '12 #6

Expert Mod 15k+
P: 31,489
Thanks guys. That's very illuminating.

I won't divert the thread off track, but I will comment that I look forward to looking into this more when I upgrade. Looks like fun, and your example, ADezii, brought the idea home in a way that articles can't easily.
Mar 8 '12 #7

Post your reply

Sign in to post your reply or Sign up for a free account.