Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Apr 2003
    Morgantown, Pennsylvania, USA
    Thanked 0 Times in 0 Posts

    Deleting a Custom Shortcut Menu (Access 2002)

    Dear Lounge Members,

    I believe I have created "The thing that won't leave." I've created a custom shortcut menu. And now I want to get rid of it because I don't use it anymore. So, I went to Tools, Customize, and displayed the shortcut menu bar. But I can't get rid of my custom shortcut menu. I can't right click on it and delete it. I can't remove all of the commands from it and delete it. I can't highlight it and press the Delete key and get rid if it. I can't even drag it off the menu bar and delete.

    Please share with me the secret of deleting this no-longer-used custom shortcut menu.


  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: Deleting a Custom Shortcut Menu (Access 2002)

    Select Tools | Customize...
    Activate the Toolbars tab.
    Click Properties.
    Select your custom shortcut menu in the dropdown list.
    Change its type from popup to toolbar.
    Click Close to return to the Customize dialog.
    Select the custom toolbar in the list of toolbars (changing it to a toolbar has made it reappear here).
    Click Delete and confirm.
    Close the Customize dialog.

  3. #3
    Bronze Lounger
    Join Date
    Nov 2001
    Arlington, Virginia, USA
    Thanked 3 Times in 3 Posts

    Re: Deleting a Custom Shortcut Menu (Access 2002)

    On a recent project where I imported toolbars from another project, and wound up with a bunch of unwanted custom popup menus, I also found this to be a major annoyance. For some inexplicable reason, MS does not make the "Shortcut Menus" toolbar accessible from VBA the same way other commandbar objects (menus & toolbars) are. As noted in MSKB 208444 - ACC2000: Can't Access ShortCut Menus CommandBar from Code:

    "You can't use Visual Basic for Applications to reference the Shortcut Menus toolbar. It is the only toolbar that is not available by using Visual Basic for Applications."

    (No explanation provided.) Therefore you can't simply loop thru the custom popup menus programatically and delete all or some of them in one fell swoop. But noted in article you can reference custom shortcut menus individually by name. Thus to delete an unwanted custom popup, you can run code like this from the Immediate window or within a procedure:

    <code>Application.CommandBars("MyCustomPopup").Del ete</code>

    where "MyCustomPopup" is the name of your custom shortcut menu (assumes you used a unique name for the popup). This is what I wound up doing to get rid of the unwanted popup menus (there weren't that many). Of course the technique Hans described also works, using the UI.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts