+ Reply to Thread
Results 1 to 6 of 6

Cannot disable Paste Button in Columns context menu

  1. #1
    Registered User
    Join Date
    11-21-2015
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 2013
    Posts
    52

    Cannot disable Paste Button in Columns context menu

    Hi All

    I'm using the following this code to try and hide the Paste button so that when the user accesses (right-mouse click) the context menu for the selected Column it is disabled

    Please Login or Register  to view this content.
    All my google searches have identified this controlID as 22 however the code does not work. It works for other controls I hide like Paste Special

    Any ideas on this please. Using Excel 2010

    Thanks in advance

    Rick

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,289

    Re: Cannot disable Paste Button in Columns context menu

    Do you only want to disable it on the Column menu, or on all menus? You'll need to modify the CustomUI part of the workbook in order to do either.
    Remember what the dormouse said
    Feed your head

  3. #3
    Registered User
    Join Date
    11-21-2015
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 2013
    Posts
    52

    Re: Cannot disable Paste Button in Columns context menu

    Both column and Row but not Cells. I've tried doing it with CustomUI but can't find correct idMso for PasteSpecial

  4. #4
    Registered User
    Join Date
    11-21-2015
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 2013
    Posts
    52

    Re: Cannot disable Paste Button in Columns context menu

    I would prefer to do this using CustomUI. Attached file has xml code to modify the context menu but I need to find the idMso to also disable the Paste Special, Insert and Delete options.

    Any help appreciated
    Attached Files Attached Files

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,289

    Re: Cannot disable Paste Button in Columns context menu

    It look as though you need a combination of the XMl and the commandbars code to get all the controls. (you need ids 21437, 3183 and 294 for those controls).

  6. #6
    Registered User
    Join Date
    11-21-2015
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 2013
    Posts
    52

    Re: Cannot disable Paste Button in Columns context menu

    Thanks romperstomper - I was hoping for one for the other but I think you're right.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Custom button on Formula Bar Context Menu not working
    By izakl in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-07-2014, 05:00 PM
  2. Remove Paste Special Dialog box from the Context Menu
    By kadams99 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-25-2014, 02:16 PM
  3. Cannot remove Paste Special from Cell Context Menu
    By Mistweaver in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-09-2014, 03:21 AM
  4. [SOLVED] Insert and Delete context menu items disabled for columns
    By Jeff Hopper in forum Excel General
    Replies: 0
    Last Post: 03-28-2006, 01:10 PM
  5. [SOLVED] Context Menu, Paste Special From Selected Range
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-20-2006, 02:30 PM
  6. Disable Shift+F10 & context menu key in worksheet
    By Lurc in forum Excel General
    Replies: 2
    Last Post: 05-23-2005, 02:06 AM
  7. How to disable the "Insert Copied Cells" context menu item
    By Coen in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 02-09-2005, 06:06 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1