View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Dan E[_4_] Dan E[_4_] is offline
external usenet poster
 
Posts: 11
Default How do i allow users to edit a cell's contents, but prevent them from moving, cutting or deleting the cell?

Thank you so much for your patience - I think I understand now. However,
what I can not see is this - the user simply has the worksheet open - it
consists of some columns of data cells, any of which may need editing (but
not deleting, cutting etc.), and hidden between those columns are two
columns of formulas that refer to the data cells. The formulas are like
this:-

=IF(OR(B5="",B5="-"),"-",IF(RIGHT(B5,2)="OR","-",LOOKUP(B5,Crib!$A$1:$A$272,Crib!$B$1:$B$272) ))

- the formula examines the data cell, and gives a numeric result that it
looks up in a VLOOKUP sheet if the value in the data cell matches one of the
column A values in the VLOOKUP (Crib). The problem I've been having is that
the user sometimes cuts and pastes a cell into the location s/he is editing,
instead of editing the cell's contents. This gives a #REF! error as the
result of the formula, because the cell (B5 in this case) is no longer
there. Now, what I can't see is how your macro method can be applied to
this situation - does the user have to run a macro in order to edit the
cell, or how does it work practically? Sorry to be dumb!

TIA,

Dan
"D.2" wrote in message
...

because you are a novice: be aware of this fact

the code must be written in the needed Sheet's code (not in a module,
neither in the workbook's code) because the events' subs will be called
only with this sheet...