+ Reply to Thread
Results 1 to 4 of 4

Unlock Data Validation Cells Only If Prior Cell Selection Made

  1. #1
    Registered User
    Join Date
    02-13-2015
    Location
    Boston, MA
    MS-Off Ver
    2013
    Posts
    10

    Unlock Data Validation Cells Only If Prior Cell Selection Made

    I have 3 Data Validation Cells (C1:C3). I am trying to lock the data validation tab on C3, until a selection is made in C2.

    Is there a way to do this using VBA code?

    Any help would be appreciated

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,055

    Re: Unlock Data Validation Cells Only If Prior Cell Selection Made

    Start by unlocking cells C1 and C2. Leave cell C3 locked. Next protect your worksheet. Copy and paste this macro into the worksheet code module. Do the following: right click the tab for your sheet and click 'View Code'. Paste the macro into the empty code window that opens up. Close the code window to return to your sheet. You will be able to make a selection only in C1 and C2. Once you make a selection in C2, cell C3 will become unlocked.
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    02-13-2015
    Location
    Boston, MA
    MS-Off Ver
    2013
    Posts
    10

    Re: Unlock Data Validation Cells Only If Prior Cell Selection Made

    Quote Originally Posted by Mumps1 View Post
    Start by unlocking cells C1 and C2. Leave cell C3 locked. Next protect your worksheet. Copy and paste this macro into the worksheet code module. Do the following: right click the tab for your sheet and click 'View Code'. Paste the macro into the empty code window that opens up. Close the code window to return to your sheet. You will be able to make a selection only in C1 and C2. Once you make a selection in C2, cell C3 will become unlocked.
    Please Login or Register  to view this content.

    Awesome, this code works great by itself. Thanks for the quick reply! I now have a new problem though. Perhaps you might be able to assist. I have existing VBA code in the same section, and I'm not sure how to place the new code in order to get all of it to work.

    My initial code is:

    Please Login or Register  to view this content.
    How might I integrate both codes so they work together?

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,055

    Re: Unlock Data Validation Cells Only If Prior Cell Selection Made

    I'm not sure if this will do what you want. It would be easier to help if you could post a copy of your file with a detailed explanation of what you want to do.
    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)

Similar Threads

  1. Unlock Sheet on cell selection?
    By welshman010 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-03-2014, 08:13 AM
  2. Replies: 3
    Last Post: 04-23-2013, 07:11 PM
  3. Macro Runs Selection is Made from Validation List
    By jadown in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-08-2011, 03:18 PM
  4. Replies: 6
    Last Post: 11-09-2011, 07:33 AM
  5. data validation-How do you unlock cells?
    By changetires in forum Excel General
    Replies: 3
    Last Post: 07-11-2006, 05:10 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