Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Apr 2001
    Location
    Arriving Somewhere but not Here
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts

    removing custom entry from a context menu (XL97 sr

    Ages ago some kind sole out there (user name Brooke) provided the code below to add an entry to my right click pop-up menu:

    Sub brooke_modify_menu21()
    'On Error Resume Next
    With Application.CommandBars(21).Controls
    With .Add(msoControlButton)
    .Caption = "Paste Special values"
    .OnAction = "bcrtPSV" 'calls a sub to do a paste special value
    End With
    End With
    End Sub

    It works a treat but how do I undo this customisation? I can delete the system toolbar file (username.xlb) but that is hardly subtle. I was thinking along the lines of:
    Application.CommandBars(21).Controls.Reset
    but the .Reset bit doesn't seem to be an option.

    stuck

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: removing custom entry from a context menu (XL97 sr

    I guess:

    Application.CommandBars(21).Controls("Paste Special values").Delete
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  3. #3
    5 Star Lounger
    Join Date
    Apr 2001
    Location
    Arriving Somewhere but not Here
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: removing custom entry from a context menu (XL9

    And you'd be right (yet again!)

    I'm sure I had tried .Delete but I definitely did not specify ("Paste Special values"). I was further confused by the fact when I type Controls. the pop up list that appears does not include Delete as an option.

    Thank you.

    (not) stuck (well, not for a few minutes anyway)

Posting Permissions

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