+ Reply to Thread
Results 1 to 4 of 4

Disabling the Deletion of Rows Across Multiple Worksheets

  1. #1
    Registered User
    Join Date
    02-11-2011
    Location
    Wisconsin, USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Disabling the Deletion of Rows Across Multiple Worksheets

    I have a workbook with several worksheets used to track information about hundreds of people across different departments. What I wish to find out is if there is a macro I could create that would disable a user from being able to delete rows across multiple worksheets but allow them to still delete rows in a single worksheet.

    Ideally, if the user has more than one worksheet currently selected, the "Delete" option would be disabled i.e. grayed out. If they only have one worksheet selected, it would work as normal. This is to prevent a user from unintentionally deleting rows across multiple worksheets when they only intend on deleting rows in the worksheet they're currently viewing.

    Any ideas? Thanks in advance.
    Last edited by brickne2; 02-15-2011 at 02:47 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,213

    Re: Disabling the Deletion of Rows Across Multiple Worksheets

    Try this:

    Please Login or Register  to view this content.

    Beware though that this might stop you copying and pasting into another sheet ... but I haven't thoroughly tested all the implications.

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    02-11-2011
    Location
    Wisconsin, USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Disabling the Deletion of Rows Across Multiple Worksheets

    Thanks. This works. And, you're right; it disables copying/pasting into other sheets.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,213

    Re: Disabling the Deletion of Rows Across Multiple Worksheets

    You're welcome. Thanks for the feedback.

    If this does what you wanted, please mark the thread as "solved"

    Regards

+ 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