keilah
04-02-2008, 03:19 AM
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveSheet.ProtectContents = True Then
If ActiveCell.Locked = True Then
MsgBox "Select cells are locked"
End If
End If
End Sub
Hi experts
I have the following vba code but when i add it to the worksheet and lock the cells i cannot get the message to apear if the users trys to click into a locked range of cells.......
not sure what i am doing wrong
If ActiveSheet.ProtectContents = True Then
If ActiveCell.Locked = True Then
MsgBox "Select cells are locked"
End If
End If
End Sub
Hi experts
I have the following vba code but when i add it to the worksheet and lock the cells i cannot get the message to apear if the users trys to click into a locked range of cells.......
not sure what i am doing wrong