+ Reply to Thread
Results 1 to 4 of 4

Prevent copy paste from another doc into specifc column in Excel

  1. #1
    Registered User
    Join Date
    08-06-2012
    Location
    Lehi, UT
    MS-Off Ver
    2007
    Posts
    8

    Prevent copy paste from another doc into specifc column in Excel

    I have a column of data in an excel worksheet that contains fields with dropdown lists. I want to be able to prevent a user from copying from another document (excel, word, notepad) and pasting in column A.

    I have tried different code snippets I've found, and can prevent copying when I select a cell in the same worksheet and try to paste in column A. However, if I select text from another document, I am still able to paste. I've also noticed that in the dropdown list cells, if I copy from the same worksheet by actually selecting text (versus just selecting the cell), then I can still paste into the dropdown list field.

    Can you help?

  2. #2
    Forum Contributor wallyeye's Avatar
    Join Date
    05-06-2011
    Location
    Arizona
    MS-Off Ver
    Office 2010, 2007
    Posts
    308

    Re: Prevent copy paste from another doc into specifc column in Excel

    Just tie it into an Application.Undo:

    Please Login or Register  to view this content.
    where you want to protect column A (1).

  3. #3
    Registered User
    Join Date
    08-06-2012
    Location
    Lehi, UT
    MS-Off Ver
    2007
    Posts
    8

    Re: Prevent copy paste from another doc into specifc column in Excel

    wallyeye, thanks for the code. It works wonderfully for preventing the pasting of text from other documents. However, now I in column A I cannot select other values from the dropdown lists. For each field in Column A, I want the user to be able to select a value from the field's dropdown, but not be able to paste other data in.

  4. #4
    Forum Contributor wallyeye's Avatar
    Join Date
    05-06-2011
    Location
    Arizona
    MS-Off Ver
    Office 2010, 2007
    Posts
    308

    Re: Prevent copy paste from another doc into specifc column in Excel

    lol, that's not very useful!

    Here is a version that works with Data Validation:

    Please Login or Register  to view this content.

+ 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