View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Andrew Andrew is offline
external usenet poster
 
Posts: 358
Default Have code check cell contents on edit.

Hi,

I am trying to identify if there is a way of having a worksheet unprotected
but preventing a cell from being edited (using the 'F2' button or simply
typing into it) if there is a formulae in it ('=' in the first character).

I can see how to check after the change has been made using
Worksheet_Change(ByVal Target As Range) but is there 'BEFORE_CHANGE' method.

The reason I want this is becuase we want end users to be able to sort,
insert etc as usual but if they select cell 'B4' and type or press the 'F2'
button a message box will appear saying they can't edit.

Andrew
160108


--
Andrew