+ Reply to Thread
Results 1 to 2 of 2

Disable Paste in Data Validation Cells (List) - Locked

  1. #1
    Registered User
    Join Date
    02-20-2021
    Location
    BC, Canada
    MS-Off Ver
    Microsoft Office Professional Plus 2016
    Posts
    13

    Question Disable Paste in Data Validation Cells (List) - Locked

    Hey guys,

    Learning more about VBA - This is my second post. I've done some searching but it's not taken me anywhere!
    Code pasted below is simply blocking "Paste" function to any cells formatted with Data Validation.

    Is there a way that I can add variables to the code below, so that pasting will be allowed if Data Validation rules are matched (and Alert Message upon no match)?

    Thanks in advance for any input.

    Please Login or Register  to view this content.
    Last edited by MaddenJMF; 02-25-2021 at 11:50 PM. Reason: Clarification of posted code

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Disable Paste in Data Validation Cells (List) - Locked

    I have tested this. I tried to use a loop to test all cells that changed for a multi-cell paste, but needs more thinking because of the Undo. If you exit when Count > 1 then you are going to miss cases.
    Please Login or Register  to view this content.
    Last edited by 6StringJazzer; 02-26-2021 at 04:02 PM.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Disable Typing/Paste/editing & Double click on locked cell without notification alert
    By abhinavbinkar in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-19-2018, 05:14 AM
  2. [SOLVED] Disable copy/cut/paste function for unlocked cells in a predominantly locked spreasheet
    By Tommaso Nardin in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-11-2017, 04:03 AM
  3. Copy and paste locked cells, and have pasted cells retain LOCKED status.
    By stratloveslenny in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-16-2014, 03:05 PM
  4. Replies: 3
    Last Post: 04-12-2014, 04:47 AM
  5. Editing List in Data Validation. Source is locked/hidden
    By DanAlves in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-12-2014, 05:24 PM
  6. Help on paste over data validation list cells
    By kumari in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-11-2013, 05:44 AM
  7. Replies: 1
    Last Post: 07-25-2013, 02:26 PM

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