+ Reply to Thread
Results 1 to 9 of 9

Disable cut and paste for protected cells

  1. #1
    Registered User
    Join Date
    08-24-2007
    Location
    London uk
    Posts
    3

    Disable cut and paste for protected cells

    Afternoon all,

    Currently I have a spreadsheet that different sites report back to me on.
    These spreadsheets have had the tabs protected with some cells protected and some cells not, as I wish them to enter certain information.

    Currently the unprotected cells are able to be cut and pasted over other unprotected cells, how can I disable the user from being able to cut and paste in the entire workbook.

    Regards,
    Lyndon
    Last edited by Paul; 07-17-2012 at 01:39 PM. Reason: Removed e-mail address to prevent spam.

  2. #2
    Forum Contributor
    Join Date
    09-04-2006
    Location
    Yorkshire, England
    Posts
    267
    Hi,

    As far as i can remember this should disable all the options e.g menus as well as right click options and shortcut keys.

    Please Login or Register  to view this content.
    just place in the 'This workbook' module and not standard module in VBA editor (Alt-F11)

    hope it helps
    JR
    Versions
    Mac OS X 'Leopard'
    Mac MS Office Excel 2004
    Windows XP
    MS Excel 2002
    MS Excel 2003

  3. #3
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,500
    Hi there,

    As a general rule, Pasting doesn't create as many problems as Cutting, because the cell locking prevents values from being pasted where they shouldn't be. Cutting is a different story altogether, as it can corrupt cell references in formulas etc.

    Some time ago I wrote the following code which totally disables the Cut operation for the workbook which contains the code. Other workbooks are unaffected.

    You might find the following code useful. It must be inserted in the "ThisWorkbook" VBA code module of the workbook which you want to protect.

    Please Login or Register  to view this content.
    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

  4. #4
    Registered User
    Join Date
    08-24-2007
    Location
    London uk
    Posts
    3

    Big Thank you

    Thank you for the help.

    Greg, you have hit the nail on the head that is my exact problem it is throwing out my linked sheet irrespective of how I reference the formulas between tabs.

    1st time I have ever submitted a post on a forum and I greatly appreciate the feedback.

  5. #5
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,500
    Hi again Lyndon,

    Thanks for the feedback. You're very welcome - glad to have helped.

    All the best,

    Greg M

  6. #6
    Registered User
    Join Date
    08-24-2007
    Location
    London uk
    Posts
    3

    Right click mouse

    Greg,

    Should this disable the right click mouse cut and paste short cut.

    Currently the menu items are disabled with a message, but I have circumnavigated it by usint he mouse.

    Any ideas.

    Lyndon.

  7. #7
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,500
    Hi again Lyndon,

    Sorry for the delay in getting back to you with this one.

    To disable the "Cut" command on the "Cell" shortcut (right-click) menu, use the following code:

    Please Login or Register  to view this content.
    Hope this helps - please let me know how you get on.

    Best regards,

    Greg M

  8. #8
    Registered User
    Join Date
    07-17-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Disable cut and paste for protected cells

    Greg - Need help to disable this function for selective cells in a worksheet.

  9. #9
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Disable cut and paste for protected cells

    Jithesh,

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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