Can Anyone help with this code:
I am trying to allow only one entry per row
so once it is filled (Col V counts the number of entries)
Bn:Un gets locked and coloured black
the cell just populated remains uncoloured and unlocked
If the cell contents get deleted the whole row is unlocked
the code above does not compile
Martin
I am trying to allow only one entry per row
so once it is filled (Col V counts the number of entries)
Bn:Un gets locked and coloured black
the cell just populated remains uncoloured and unlocked
If the cell contents get deleted the whole row is unlocked
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With ActiveCell
If V & Row = 1 Then _
RANGE("B" & Row ":U" & Row).Locked = True
.Interior.Color = Black
End If
ActiveCell.Interior.Color = White
ActiveCell.Locked = False
If ActiveCell = "" Then _
RANGE("B" & Row ":U" & Row).Locked = False
.Interior.Color = White
End If
End Sub
the code above does not compile
Martin