+ Reply to Thread
Results 1 to 8 of 8

disable copy paste

  1. #1
    Tim
    Guest

    disable copy paste

    How do I disable the copy paste feature?

  2. #2
    Jake Marx
    Guest

    Re: disable copy paste

    Hi Tim,

    Tim wrote:
    > How do I disable the copy paste feature?


    You could try disabling all the places copy/cut/paste appear in the menus
    (including context menus), but you'd still have to deal with other ways
    people can copy/paste (Ctrl+c, Ctrl+x, Ctrl+v, etc). So maybe the easiest
    way is to put the following code behind the Worksheet(s) you wish to disable
    pasting:

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Application.CutCopyMode = False
    End Sub

    This will allow the user to copy or cut, but every time the selection is
    changed to a new cell or range, the clipboard will be cleared.

    --
    Regards,

    Jake Marx
    MS MVP - Excel
    www.longhead.com

    [please keep replies in the newsgroup - email address unmonitored]


  3. #3
    Tim
    Guest

    Re: disable copy paste

    Thanks Jake,

    How do I do that??

    "Jake Marx" wrote:

    > Hi Tim,
    >
    > Tim wrote:
    > > How do I disable the copy paste feature?

    >
    > You could try disabling all the places copy/cut/paste appear in the menus
    > (including context menus), but you'd still have to deal with other ways
    > people can copy/paste (Ctrl+c, Ctrl+x, Ctrl+v, etc). So maybe the easiest
    > way is to put the following code behind the Worksheet(s) you wish to disable
    > pasting:
    >
    > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    > Application.CutCopyMode = False
    > End Sub
    >
    > This will allow the user to copy or cut, but every time the selection is
    > changed to a new cell or range, the clipboard will be cleared.
    >
    > --
    > Regards,
    >
    > Jake Marx
    > MS MVP - Excel
    > www.longhead.com
    >
    > [please keep replies in the newsgroup - email address unmonitored]
    >
    >


  4. #4
    Jake Marx
    Guest

    Re: disable copy paste

    Tim,

    Tim wrote:
    > How do I do that??


    Right-click the worksheet you want to apply this to and select "View Code".
    Paste the code below into the resulting code pane.

    --
    Regards,

    Jake Marx
    MS MVP - Excel
    www.longhead.com

    [please keep replies in the newsgroup - email address unmonitored]


    >> Hi Tim,
    >>
    >> Tim wrote:
    >>> How do I disable the copy paste feature?

    >>
    >> You could try disabling all the places copy/cut/paste appear in the
    >> menus (including context menus), but you'd still have to deal with
    >> other ways people can copy/paste (Ctrl+c, Ctrl+x, Ctrl+v, etc). So
    >> maybe the easiest way is to put the following code behind the
    >> Worksheet(s) you wish to disable pasting:
    >>
    >> Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    >> Application.CutCopyMode = False
    >> End Sub
    >>
    >> This will allow the user to copy or cut, but every time the
    >> selection is changed to a new cell or range, the clipboard will be
    >> cleared.
    >>
    >> --
    >> Regards,
    >>
    >> Jake Marx
    >> MS MVP - Excel
    >> www.longhead.com
    >>
    >> [please keep replies in the newsgroup - email address unmonitored]



  5. #5
    Jim Thomlinson
    Guest

    Re: disable copy paste

    That is nice code. I have used similar. The problem that I ran into was
    things being pasted in from applications other than excel, or where the users
    where dragging or filling down. Any easy fix for those?

    "Jake Marx" wrote:

    > Hi Tim,
    >
    > Tim wrote:
    > > How do I disable the copy paste feature?

    >
    > You could try disabling all the places copy/cut/paste appear in the menus
    > (including context menus), but you'd still have to deal with other ways
    > people can copy/paste (Ctrl+c, Ctrl+x, Ctrl+v, etc). So maybe the easiest
    > way is to put the following code behind the Worksheet(s) you wish to disable
    > pasting:
    >
    > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    > Application.CutCopyMode = False
    > End Sub
    >
    > This will allow the user to copy or cut, but every time the selection is
    > changed to a new cell or range, the clipboard will be cleared.
    >
    > --
    > Regards,
    >
    > Jake Marx
    > MS MVP - Excel
    > www.longhead.com
    >
    > [please keep replies in the newsgroup - email address unmonitored]
    >
    >


  6. #6
    Fredrik Wahlgren
    Guest

    Re: disable copy paste


    "Jim Thomlinson" <JimThomlinson@discussions.microsoft.com> wrote in message
    news:06D2B3A0-16FE-45B4-9477-4FAA766AE3AC@microsoft.com...
    > That is nice code. I have used similar. The problem that I ran into was
    > things being pasted in from applications other than excel, or where the

    users
    > where dragging or filling down. Any easy fix for those?
    >

    http://www.excelforum.com/archive/in.../t-229810.html

    /Fredrik



  7. #7
    Jake Marx
    Guest

    Re: disable copy paste

    Hi Jim,

    Jim Thomlinson wrote:
    > That is nice code. I have used similar. The problem that I ran into
    > was things being pasted in from applications other than excel, or
    > where the users where dragging or filling down. Any easy fix for
    > those?


    I don't know about denying the user from copying values in from another app,
    but as Fredrik suggested, you can use Application.CellDragAndDrop = False to
    prohibit users from copying down, filling, dragging cells, etc.

    --
    Regards,

    Jake Marx
    MS MVP - Excel
    www.longhead.com

    [please keep replies in the newsgroup - email address unmonitored]


  8. #8
    Henk Frigge
    Guest

    Re: disable copy paste

    Everything is working fine, however, I would like to prevent my users from
    Cutting and Pasting only. If they Copy and Paste it's okay. If they Cut and
    Paste the change lots of formula's in the backgropund of my workbooks. Any
    idears?

    Regards,

    Henk


    "Jake Marx" wrote:

    > Tim,
    >
    > Tim wrote:
    > > How do I do that??

    >
    > Right-click the worksheet you want to apply this to and select "View Code".
    > Paste the code below into the resulting code pane.
    >
    > --
    > Regards,
    >
    > Jake Marx
    > MS MVP - Excel
    > www.longhead.com
    >
    > [please keep replies in the newsgroup - email address unmonitored]
    >
    >
    > >> Hi Tim,
    > >>
    > >> Tim wrote:
    > >>> How do I disable the copy paste feature?
    > >>
    > >> You could try disabling all the places copy/cut/paste appear in the
    > >> menus (including context menus), but you'd still have to deal with
    > >> other ways people can copy/paste (Ctrl+c, Ctrl+x, Ctrl+v, etc). So
    > >> maybe the easiest way is to put the following code behind the
    > >> Worksheet(s) you wish to disable pasting:
    > >>
    > >> Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    > >> Application.CutCopyMode = False
    > >> End Sub
    > >>
    > >> This will allow the user to copy or cut, but every time the
    > >> selection is changed to a new cell or range, the clipboard will be
    > >> cleared.
    > >>
    > >> --
    > >> Regards,
    > >>
    > >> Jake Marx
    > >> MS MVP - Excel
    > >> www.longhead.com
    > >>
    > >> [please keep replies in the newsgroup - email address unmonitored]

    >
    >


+ 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