+ Reply to Thread
Results 1 to 3 of 3

Disable "Delete" from row menu...

  1. #1
    Registered User
    Join Date
    05-15-2009
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    6

    Disable "Delete" from row menu...

    Hello,

    I am trying to disable the menu item "Delete" when an entire row is selected.

    I tried this code

    Please Login or Register  to view this content.
    It will not compile... I ahve tried searching everywhere online but to no avail.

    What am I doing wrong?

    Thanks
    Last edited by Paul; 05-21-2009 at 12:32 AM. Reason: Added code tags and PM'd user

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Disable "Delete" from row menu...

    Hello smck,

    When identifying a CommandBarControl by name, you have to use a special character to denote the underscored letter, like Delete

    To do this, precede the letter that is underscored with an Ampersand character.
    Please Login or Register  to view this content.
    Note: Since this CommandBar is a Popup, one or Rows must be selected before the code is executed.
    Last edited by Leith Ross; 05-21-2009 at 12:01 AM. Reason: Added note
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    05-15-2009
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Disable "Delete" from row menu...

    Thanks,

    With regards to your note (in red) would I have to make this trigger from an event? I have trying to have this code executed as soon as the workbook opens, but it will not work.

    My goal is to restrict users from doing the following:

    Insert, and delete columns.
    Delete rows.. (They will still be allowed to insert rows however)

    Any additional advise?

    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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