Following code was provided by a good samaritan in this forum, and while I do testing, I found an error which I kindly need further assistance.
Below code will give an error when the excel cell is double-clicked when it is locked in format. Now the issue is, I observed when the cell is just selected ( only one click on cell), users are still able to edit ( enter values ).
I can not use Protect sheet functionality since it will ignore customize error .
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Locked Then
MsgBox "Stop!" & vbNewLine & vbNewLine & "Please Update only the YELLOW cells.", vbCritical, "STOP!"
Cancel = True
End If
End Sub
Could we get an error when double-clicked or when any value tried to enter? At least the latter would be great.
Below code will give an error when the excel cell is double-clicked when it is locked in format. Now the issue is, I observed when the cell is just selected ( only one click on cell), users are still able to edit ( enter values ).
I can not use Protect sheet functionality since it will ignore customize error .
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Locked Then
MsgBox "Stop!" & vbNewLine & vbNewLine & "Please Update only the YELLOW cells.", vbCritical, "STOP!"
Cancel = True
End If
End Sub
Could we get an error when double-clicked or when any value tried to enter? At least the latter would be great.