+ Reply to Thread
Results 1 to 8 of 8

Data Validation Macro stops working when worksheet is protected

  1. #1
    Registered User
    Join Date
    06-02-2014
    Posts
    3

    Data Validation Macro stops working when worksheet is protected

    Please Login or Register  to view this content.
    Hey guys, cross posting this from mrexcel http://www.mrexcel.com/forum/excel-q...protected.html.

    I found this simple sub/function that does not allow users to paste invalid data over a cell with data validation. It works fine until I protect the worksheet. Once it's protected the function always returns a value of "true" and doesn't function correctly.

  2. #2
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: Data Validation Macro stops working when worksheet is protected

    Did you try to unprotect your Sheet then Unlocking the cells you need then locking it again?

    ...

    Yes you did sorry didn't see your Link posted on MrExcel
    Last edited by Excelnoub; 06-06-2014 at 01:19 PM.

  3. #3
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: Data Validation Macro stops working when worksheet is protected

    Actually I did it with the following code and everything works well, I cannot Copy and Paste into Column B even after the worksheet is protected:

    Please Login or Register  to view this content.
    It tells me "You must choose a valid response from the DropDown" or if I add something like A (my DV was 1,2,3) it ...."Value ...is not valid "

  4. #4
    Registered User
    Join Date
    06-02-2014
    Posts
    3

    Re: Data Validation Macro stops working when worksheet is protected

    I've tried creating a blank spreadsheet, locking only the header row, and it still always comes back true for me. Using excel 2010.

  5. #5
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: Data Validation Macro stops working when worksheet is protected

    Could you upload a workseet example?

  6. #6
    Registered User
    Join Date
    06-02-2014
    Posts
    3

    Re: Data Validation Macro stops working when worksheet is protected

    Upload Book.xlsm

    Here is a quick test book I created.

  7. #7
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: Data Validation Macro stops working when worksheet is protected

    Try this for now...

    In module:

    Please Login or Register  to view this content.
    Unloack your Cells In column A that will have Validation and change your code in sheet to:

    Please Login or Register  to view this content.
    Let me know if it does something

  8. #8
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: Data Validation Macro stops working when worksheet is protected

    Nope just tested it

+ 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. Excel crashes / stops working properly after deleting a worksheet
    By Pedsdude in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-02-2014, 05:11 AM
  2. List Data Validation and Protected Worksheet - Cant copy
    By liam_bettinson in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-06-2012, 06:48 AM
  3. [SOLVED] Macro stops working when I go to a different worksheet
    By gandrea in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-31-2012, 01:40 PM
  4. Data Validation not working in one worksheet
    By hnowack in forum Excel General
    Replies: 1
    Last Post: 05-12-2008, 09:33 PM
  5. Validation List Stops working
    By Brian Matlock in forum Excel General
    Replies: 2
    Last Post: 08-19-2005, 04:05 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