Closed Thread
Results 1 to 2 of 2

prevent the copy and paste function

  1. #1
    sir Lancelot
    Guest

    prevent the copy and paste function

    Can users be prevented from using the copy or paste function in shared
    workbooks. I have several cells in workbooks that contain data validation.
    I want to prevent other users from overriding the validation. Can this be
    done? The workbooks are protected and shared but the worksheets are not.

  2. #2
    Jerry Price
    Guest

    Re: prevent the copy and paste function



    This will disable Copy / Paste, load on Workbook open:

    '///
    Sub DisablePaste()
    EnableControl 21, False ' cut
    EnableControl 19, False ' copy
    EnableControl 22, False ' paste
    EnableControl 755, False ' pastespecial
    Application.OnKey "^c", "Message"
    Application.OnKey "^v", "Message"
    Application.OnKey "+{DEL}", "Message"
    Application.OnKey "+{INSERT}", "Message"
    Application.CellDragAndDrop = False
    Application.OnDoubleClick = "Message"
    CommandBars("ToolBar List").Enabled = False
    End Sub
    '///


    Load on Workbook Close

    '///
    Sub EnablePaste()
    EnableControl 21, True ' cut
    EnableControl 19, True ' copy
    EnableControl 22, True ' paste
    EnableControl 755, True ' pastespecial
    Application.OnKey "^c"
    Application.OnKey "^v"
    Application.OnKey "+{DEL}"
    Application.OnKey "+{INSERT}"
    Application.CellDragAndDrop = True
    Application.OnDoubleClick = ""
    CommandBars("ToolBar List").Enabled = True
    End Sub
    '///




    Sub Message()
    '// NoGo
    MsgBox "Sorry command not Available!" & vbCrLf & _
    "Cannot Paste or ''drag & drop''.", 16, "on any Scope Sheets in this
    workbook:"
    End Sub





    sir Lancelot wrote:

    > Can users be prevented from using the copy or paste function in shared
    > workbooks. I have several cells in workbooks that contain data validation.
    > I want to prevent other users from overriding the validation. Can this be
    > done? The workbooks are protected and shared but the worksheets are not.


    --
    Thanks & Regards,

    Jerry

Closed 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