+ Reply to Thread
Results 1 to 9 of 9

Disable Cut,Copy and Paste Functions on Protected Worksheet

  1. #1
    Registered User
    Join Date
    12-16-2012
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    19

    Disable Cut,Copy and Paste Functions on Protected Worksheet

    Hello,
    I have a workbook that uses a Macro to protect the whole workbook at the end of the month. The problem is that even though the workbook is protected, and ALL cells are locked, you can still select 'cut' and 'copy' using the toolbar buttons, and and it will allow you to do it. It will only cut or copy the last selected cell on that worksheet, and will paste into the last selected cell on any worksheet. This is a big problem, as it means someone can actually remove the contents of the last selected cell and paste it into another, or into another workbook.
    Is there a way to completely disable the cut,paste and copy toolbar buttons, right mouse click options, and keyboard shortcuts? Or alternatively is there a code to COMPLETELY protect the whole workbook that I can insert into the end of month protection macro, that will prevent any changes whatsoever? Once protected at the end of the month, the workbook only needs to be openable, readable, and printable, but that is it. No selection of cells, no formatting, nothing.
    I have researched online and tried a number of different codes but none have worked in disabling the toolbar buttons.
    Please help as I am on a deadline to get this workbook up and running 100%.

    Regards,
    Benn

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Disable Cut,Copy and Paste Functions on Protected Worksheet

    Hi Benn,

    Maybe you need...Disable Cut, Copy, Paste
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    12-16-2012
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Disable Cut,Copy and Paste Functions on Protected Worksheet

    Hi Jeff,
    I tried that. Copied the code, and pasted into my Workbook as per the instructions. I can still cut and paste using the 'clipboard' buttons on the toolbar. I also opened the sample file attached at the link, and could do the same on that too!

    Cheers,
    Benn

  4. #4
    Registered User
    Join Date
    12-16-2012
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Disable Cut,Copy and Paste Functions on Protected Worksheet

    Is there maybe something in my End of Month Code that is overriding it ?
    Here is the code;
    Please Login or Register  to view this content.
    Last edited by tigerbenn; 12-25-2012 at 10:59 PM. Reason: code tags didn't work

  5. #5
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Disable Cut,Copy and Paste Functions on Protected Worksheet

    Hi Benn,

    So are you saying you are not worried about the workbook as much as being able to retrieve from the clipboard?
    Last edited by jeffreybrown; 12-25-2012 at 11:04 PM.

  6. #6
    Registered User
    Join Date
    12-16-2012
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Disable Cut,Copy and Paste Functions on Protected Worksheet

    Hi Jeff,
    No I am worried that after running the end of month protection, someone still can cut,copy and paste using the clipboard buttons, and therefore can actually cut cells containing important data.

  7. #7
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Disable Cut,Copy and Paste Functions on Protected Worksheet

    I honestly think the only alternative to prevent that would be to manipulate the ribbon.

    http://www.rondebruin.nl/ribbon.htm

  8. #8
    Registered User
    Join Date
    12-16-2012
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Disable Cut,Copy and Paste Functions on Protected Worksheet

    As a workaround, is there a way of including in the above code, that a specific cell is selected, say 'AH1', on each Worksheet in the Workbook. Then if someone selects 'cut or copy' and then tries to paste it, they are only cutting or copying an empty cell? I have tried this code, but can only get it to select cell AH1 on the active Worksheet. How would I rewrite it so that it selects that cell on each worksheet?

    Please Login or Register  to view this content.
    Regards,
    Benn

  9. #9
    Registered User
    Join Date
    12-16-2012
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Disable Cut,Copy and Paste Functions on Protected Worksheet

    Hi Jeff,
    I went to the site you recommended, downloaded the UI Editor, and then using the info found on Andy Pope's thread;

    http://www.excelforum.com/excel-prog...bon-excel.html

    I got it working exactly how I want.

    Thanks for pointing me in the right direction!!

    Regards,
    Benn
    Last edited by tigerbenn; 12-26-2012 at 04:30 PM.

+ 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