+ Reply to Thread
Results 1 to 7 of 7

Looking for a VB code to auto lock column

  1. #1
    Registered User
    Join Date
    06-05-2018
    Location
    Missouri
    MS-Off Ver
    2013
    Posts
    11

    Looking for a VB code to auto lock column

    Hello guys,

    Hoping i could get some help i am trying to make this sheet lock the entire column once a certain value is reached. I attached a sample workbook of what im working on.

    Once the Cell in Row 17 reaches the number 2 i would like for it to lock all cells in the column and change the color to red.

    If this come be done it would be awesome if someone could help me figure out how to make it work.
    Attached Files Attached Files
    Last edited by Broberts1986; 08-13-2018 at 05:35 PM. Reason: Solved

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,861

    Re: Could Use Some Help

    Welcome to the forum! Please take a moment to re-read forum rule #1 and then amend your thread title to something that better explains your problem. Changing your thread title is not optional, which means you must change it. Thanks!

    • Use concise, accurate thread titles.
    • Your post title should describe your problem, not your anticipated solution.
    • Use terms appropriate to a Google search - poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice tell us nothing.
    • Responding to a request to change your thread title by doing so is mandatory.

    To change a title go to your first post, click EDIT then Go Advanced and change your title.

    No help to be offered, please, until the OP complies with this request.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    06-05-2018
    Location
    Missouri
    MS-Off Ver
    2013
    Posts
    11

    Re: Could Use Some Help

    Im sorry for that is the title acceptable now?

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,861

    Re: Looking for a VB code to auto lock column

    Yes, thank you.

  5. #5
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Looking for a VB code to auto lock column

    Hello Broberts1986,

    How about doing it without VBA, and only use Data Validation and Conditional Formatting as shown in the attached sample Workbook?

    Regards.
    Attached Files Attached Files
    Last edited by Winon; 08-12-2018 at 01:21 PM.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  6. #6
    Registered User
    Join Date
    06-05-2018
    Location
    Missouri
    MS-Off Ver
    2013
    Posts
    11

    Re: Looking for a VB code to auto lock column

    Thank you very much Winon that works great and doesnt even require VB.

  7. #7
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Looking for a VB code to auto lock column

    Hi Broberts1986,

    You are welcome, glad I could help. Thank you for the Rep tap, and for marking this Thread as Solved.

    Regards.

+ 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