Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim myPassword As String
Dim sheet As Worksheet
If Sheets("Indstil").Range("C19") = 1 Then Exit Sub
Application.ScreenUpdating = False
'UnprotectAll
myPassword = Sheets("Indstil").Range("B1").Value
For Each sheet In ActiveWorkbook.Worksheets
sheet.Unprotect Password:=myPassword
Next sheet
Range("C2:N200,R2:T200").Interior.ColorIndex = xlNone
If Intersect(Selection, Range("C2:N200")) Is Nothing And _
Intersect(Selection, Range("R2:T200")) Is Nothing Then GoTo ud
Range("C" & ActiveCell.Row & ":N" & ActiveCell.Row & ",R" _
& ActiveCell.Row & ":T" & ActiveCell.Row).Interior.Color = rgbLemonChiffon
Rem farver - http://www.EXCELGAARD.dk/Bib/rgbFarver/Tabel/
Rem RGB(242, 242, 242) = Lysegrå
Rem RGB(255, 255, 200) = Lysegul
ud:
'ProtectAll
myPassword = Sheets("Indstil").Range("B1").Value
For Each sheet In ActiveWorkbook.Worksheets
sheet.Protect Password:=myPassword, AllowFiltering:=True
Next sheet
End Sub