+ Reply to Thread
Results 1 to 3 of 3

Data Validation Protection Macro - stops working when spreadsheet is protected

  1. #1
    Registered User
    Join Date
    09-27-2016
    Location
    Perth, Australia
    MS-Off Ver
    MS Office Professinal Plus 2010
    Posts
    23

    Data Validation Protection Macro - stops working when spreadsheet is protected

    Hi,

    I am currently working on a project which requires a document to be "fool prove". I need to protect the data validation sections of the spreadsheet, preventing users from pasting invalid content and also breaking the DV functionality. I want users to be able to paste (disabling copy and paste is not an option).

    I am using the below code which works fine until I protect the spreadsheet (DV sections are "unlocked"). Somehow the protection disables the visual basic code and allows users to paste again.

    Any ideas?



    Please Login or Register  to view this content.

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Re: Data Validation Protection Macro - stops working when spreadsheet is protected

    Good morning Rookie11

    Welcome to the forum!!

    John Walkenbach has an elegant solution to this problem, with an article describing how it works and what it won't deal with.

    http://spreadsheetpage.com/index.php...s_not_deleted/

    Oh yes, and you'll never make a workbook fool-proof. There are too many fools on this planet who, with one click of a mouse, can f*** things up beyond your wildest expectations. That's what back-ups are for.

    HTH

    DominicB

  3. #3
    Registered User
    Join Date
    09-27-2016
    Location
    Perth, Australia
    MS-Off Ver
    MS Office Professinal Plus 2010
    Posts
    23

    Re: Data Validation Protection Macro - stops working when spreadsheet is protected

    Hi.
    Thanks for the link. I have found it before and it does solve the problem of protecting the DV for unprotected sheets. However once I protect the worksheet the macro stops working and you can paste in the restricted area again.


    You are probably right though, there will never be a 'fool proof' version but I don't want to give up just yet .

+ 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. [SOLVED] Recording Data Validation - stops working!
    By D_N_L in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-26-2014, 06:40 AM
  2. Data Validation Macro stops working when worksheet is protected
    By keeferino in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-06-2014, 02:28 PM
  3. Sheet protection stops macro working.
    By Andrew-Mark in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-18-2009, 11:18 AM
  4. Replies: 10
    Last Post: 02-18-2009, 11:55 AM
  5. Protection Stops Macro From Running
    By Keith Burgess in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 06-11-2008, 07:15 AM
  6. Validation List Stops working
    By Brian Matlock in forum Excel General
    Replies: 2
    Last Post: 08-19-2005, 04:05 PM
  7. [SOLVED] Protection not working for data validation lists
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-08-2005, 09:06 PM

Tags for this Thread

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