Here is the complete sub, I couldn't get the sub that you gave me Tommy to work within my sub by removing the sub line. So here it is so you can see it all.
Private Sub WorkBook_SheetChange(ByVal Sh As Object, ByVal Target As Excel.Range)
If Sheets("Sheet1").Range("C8").Locked = False And Sheets("Sheet1").Range("F8").Locked = True Then
If Sh.Name = "Sheet1" Then
Application.EnableEvents = False
If Target.Address = [F8].Address Then
MsgBox "You don't have the authority to change the data."
Application.Undo
End If
Application.EnableEvents = True
End If
ElseIf Sheets("Sheet1").Range("F8").Locked = False And Sheets("Sheet1").Range("C8").Locked = True Then
If Sh.Name = "Sheet1" Then
Application.EnableEvents = False
If Target.Address = [C8].Address Then
MsgBox "You don't have the authority to change the data."
Application.Undo
End If
Application.EnableEvents = True
End If
ElseIf Sheets("Sheet1").Range("C8").Locked = True And Sheets("Sheet1").Range("F8").Locked = True Then
If Sh.Name = "Sheet1" Then
Application.EnableEvents = False
If Target.Address = [C8].Address Then
MsgBox "You don't have the authority to change the data."
Application.Undo
If Target.Address = [F8].Address Then
MsgBox "You don't have the authority to change the data."
Application.Undo
End If
End If
Application.EnableEvents = True
End If
End If
End Sub
Sorry for being so much trouble Tommy Gun.
ray: