+ Reply to Thread
Results 1 to 6 of 6

Unlock columns M:T when cell E has "LOP" or "XOP" or "WOP"

  1. #1
    Forum Contributor
    Join Date
    01-29-2019
    Location
    Drenthe, Netherlands
    MS-Off Ver
    Dutch Office 2019
    Posts
    291

    Unlock columns M:T when cell E has "LOP" or "XOP" or "WOP"

    I want to unlock columns M til T (M:T) when cel E has "LOP" or "XOP" or "WOP".

    This code work but does not does it all!
    Please Login or Register  to view this content.
    But this is not
    Please Login or Register  to view this content.
    How to get 3 criteria to unlock en then unlock the range M:T
    Last edited by 6StringJazzer; 11-22-2021 at 03:20 PM. Reason: better titles please

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    27,166

    Re: Unlock columns M:T when cell E has "LOP" or "XOP" or "WOP"

    Please Login or Register  to view this content.
    Boolean expression syntax doesn't work like that. You have to do this:

    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    01-29-2019
    Location
    Drenthe, Netherlands
    MS-Off Ver
    Dutch Office 2019
    Posts
    291

    Re: Unlock columns M:T when cell E has "LOP" or "XOP" or "WOP"

    Thanks. Never used or before. Stupid me used and like this and didn't realized it.
    The shJ.Range("M:T" & y).Locked = False is not working ether.

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    Win10/MSO2016
    Posts
    12,994

    Re: Unlock columns M:T when cell E has "LOP" or "XOP" or "WOP"

    Then shJ.Range("M:T" & y).Locked ---> error!

    Please Login or Register  to view this content.
    Ben Van Johnson

  5. #5
    Forum Contributor
    Join Date
    01-29-2019
    Location
    Drenthe, Netherlands
    MS-Off Ver
    Dutch Office 2019
    Posts
    291

    Re: Unlock columns M:T when cell E has "LOP" or "XOP" or "WOP"

    That is it! The or i should have known. But the .Resize(columnsize:=8) is complete new for me. So i learned something today!!

    Tanks to you both

  6. #6
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    Win10/MSO2016
    Posts
    12,994

    Re: Unlock columns M:T when cell E has "LOP" or "XOP" or "WOP"

    welcome

+ 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