+ Reply to Thread
Results 1 to 6 of 6

Excel VBA Code for locking/unlocking a cell based on the value of another cell

  1. #1
    Registered User
    Join Date
    05-21-2013
    Location
    Woodland Park, Colorado
    MS-Off Ver
    Excel 2007
    Posts
    1

    Excel VBA Code for locking/unlocking a cell based on the value of another cell

    I have a spreadsheet that check box in cells A1 through A250. I would like to "gray out/lock out" cells B and C of the line depending if the check box value of "A" is True or False . For example:

    If the value of A10 = "True" then B10 and C10 would be unlocked.

    If the value of A10 = "False" then B10 and C10 would be locked.

    Does this make sense?

    Thanks for your help!!

    Jim

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Excel VBA Code for locking/unlocking a cell based on the value of another cell

    Hi Jim,

    Something like this:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    496

    Re: Excel VBA Code for locking/unlocking a cell based on the value of another cell

    Hi xladept,
    I am interest in this too. I copy these codes to sheet 1 VBa, it does not work.
    I am very appreicatee if you can place in excel file.

    Thanks

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Excel VBA Code for locking/unlocking a cell based on the value of another cell

    Hi Rocky,

    Can you post a sample?

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    496

    Re: Excel VBA Code for locking/unlocking a cell based on the value of another cell

    Hi xladept,
    I will post a seperate new thread with a sample.

    Thanks

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Excel VBA Code for locking/unlocking a cell based on the value of another cell

    Hi Rocky,

    This thread is only at 6 posts!

+ 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