Check it out now
Check it out now
Cheers!
Deep Dave
@NeedForExcel:![]()
Private Sub Worksheet_Change(ByVal Target As Range) Dim lngCtr As Long Const cstrPW As String = "password" If Target.Count > 1 Then Exit Sub If Not Intersect(Target, Range("B2:D11")) Is Nothing Then For lngCtr = 2 To 11 If WorksheetFunction.CountBlank(Range("B" & lngCtr & ":D" & lngCtr)) = 0 Then ActiveSheet.Unprotect cstrPW Range("B" & lngCtr & ":D" & lngCtr).Locked = True Else Range("B" & lngCtr & ":D" & lngCtr).Locked = False End If Next lngCtr ActiveSheet.Protect cstrPW End If End Sub
Please enter Test into Cell B11 alone and run your code in your attachment. I doubt that all empty rows between 3 and 10 should be locked as well.
Ciao,
Holger
Use Code-Tags for showing your code: [code] Your Code here [/code]
Please mark your question Solved if there has been offered a solution that works fine for you
Hi, NeedForExcel,
no need for a full quote here - maybe have a look into the Forum Rules (#12).
Any entry into Column B would have to leave Column C and D open for more entries in that row or how will you fill the entries in these columns when the row is locked?
Ciao,
Holger
Hi, NeedForExcel,
the yellow highlighted area holds Columns B to D (which is 3 Columns) and the rows 2 to 11. With your code (which could be started at any time even if not entry or change was made) the whole area between B2 and F and the last entry row in Column B is blocked. I can´t agree on that from what I read that from post #10.
Ciao,
Holger
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks