Hi
I have a macro but dont unerstand it at all. sorry.
I have is a workbook that has certain cells unlocked so data can be input and others locked. The unlocked cells are coloured yellow.
What im trying to do is when data is input into a unlocked cell I need it locked and the yellow in the cell turn white.
Any ideas, Macro below..
I have a macro but dont unerstand it at all. sorry.
I have is a workbook that has certain cells unlocked so data can be input and others locked. The unlocked cells are coloured yellow.
What im trying to do is when data is input into a unlocked cell I need it locked and the yellow in the cell turn white.
Any ideas, Macro below..
VBA Code:
Private Sub Worksheet_Change(ByVal Target as Range)
Target.Font.ColorIndex = 5
For Each rng In ActiveSheet.Range("B4:C9")
If Not IsEmpty(rng) Then
rng.Locked = True
Else
rng.Locked = False
End If
Next rng