Results 1 to 4 of 4

Thread: VBA - Lock the cell based on Conditional Formatting

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    VBAX Mentor 大灰狼1976's Avatar
    Joined
    Dec 2018
    Location
    SuZhou China
    Posts
    479
    Location
    Hi reza_doang!
    Please refer to the attached file.
    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Count > 1 Then Exit Sub
    If Target.Address <> [h6].Address Then Exit Sub
    ActiveSheet.Unprotect "123"
    Range([i6:j6], [l6]).Locked = Target = "No"
    ActiveSheet.Protect "123"
    End Sub
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •