Results 1 to 12 of 12
  1. #1
    Euler271 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2017
    Posts
    63

    Custom command bar

    I'm not sure this is the right forum but what I want to do is substitute my own menu bar for the default version. I found code that creates command bars but it shows up under the Add-In menu header. I want the new command bar to supplant the existing one. Does anyone know how to do that?

  2. #2
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Are you talking about a customized ribbon? The name of the "Shortcut Menu Bar" is in options under Current Database.

  3. #3
    Euler271 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2017
    Posts
    63
    I don't think so. But maybe I am. I want to get rid of "File", "Home", "Create", "External Data" and "Database Tools" at the top of the screen and substitute my own menus.

  4. #4
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Yes, you would give it a name and put the name in the options. You say you found the code to create the commands, it would include the name of the menu.

  5. #5
    Euler271 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2017
    Posts
    63
    I found the code to create command bars. For example:

    Private Function CreateMenu(MenuName As String)
    Dim MenuBar As CommandBar
    If IsCreated(MenuName) Then Application.CommandBars(MenuName).delete
    Set MenuBar = Application.CommandBars.Add(MenuName, msoBarTop, True, False)
    Application.CommandBars(MenuName).Visible = True
    End Function

    But maybe I should try to find code to create ribbons. But then what are command bars used for? I notice that the command to display the ribbon is "DoCmd.ShowToolbar". Are toolbars ribbons?

  6. #6
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Now you have me all confused! Also MS says "Note The use of CommandBars in some Microsoft Office applications has been superseded by the new ribbon component of the Microsoft Office Fluent user interface".

    Menu bars are used all over, including right-click. So it is probably best to describe exactly what you are asking. If it is the ribbon, you may be able to use the Options/Customize Ribbon for this without having to use code.

  7. #7
    Euler271 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2017
    Posts
    63
    Sorry to be so confusing. It's probably because I'm confused. I guess I don't know the difference between "command bar", "menu bar" and "ribbon". It might be academic, however, since I found something from MS on how to customize the ribbon using XML and a USysRibbons table.

    //support.office.com/en-ie/article/Customize-the_Ribbon-45E110B9-531C-46ED-AB3A-4E25BC9413DE

    I haven't read it all yet, much less tried it out, but I think this will give me the instructions I need to do what I want.

    Thanks much for your responses.

  8. #8
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Post your solution once you have it, it may help others. These MS terms are rather confusing to many.

  9. #9
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Here's my take, based on going back many years.
    A menu bar is the old across the top File Tools About and anything in between that pertains to the application. You click a menu item and maybe sub menus appear, maybe not. It's housed in a command bar. A tool bar is the menu bar, but with icons, not text menus. It is also contained in a command bar. Clicking an icon never produced a menu or sub menu if I recall correctly, just launched a process. A right click menu is a context menu, not a menu bar. AFAIK, they do not have sub menus.

    As late as 2007 version, I was able to use old code from 2003 to maintain and even modify menu bars. My choice seemed to be hide the ribbon (which could also hide other needed functionality) and show the menu, or have the menu appear in the ribbon because I wasn't interested in delving into the realm of creating my own ribbon. Seems I was determined to resist being assimilated. I've since retired, so I have little idea of how the apps look now, even though I know they're still being used.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  10. #10
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Creating or modifying ribbons is much more difficult than the old command bars.
    There is no tool built in to Access to assist you with the process
    However there are various utilities available to do this both free and at a low price.
    For example the Ribbon Creator by Gunter Avenius allows you to do up to 10 buttons on the free version.
    If you want more buttons, you can buy the full version.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  11. #11
    Euler271 is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2017
    Posts
    63
    Thanks for the tip. I will download the 2010 free version from home.

  12. #12
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    BTW the 2010 version works with 2013 and 2016 as well
    If you decide to buy, only buy one version.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 05-06-2015, 01:23 PM
  2. Replies: 3
    Last Post: 03-29-2015, 07:42 PM
  3. Replies: 1
    Last Post: 09-12-2014, 06:09 AM
  4. Replies: 2
    Last Post: 05-27-2014, 11:32 AM
  5. Replies: 3
    Last Post: 04-19-2013, 07:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums