View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Colin Hayes Colin Hayes is offline
external usenet poster
 
Posts: 465
Default Event recognition.

to remove the date if D is deleted change the code:

Private Sub Workbook_SheetChange(ByVal Sh As Object, _
ByVal Target As Range)

If Target.Column < 4 Or Target.Count 1 Then Exit Sub

Target.Offset(, -1) = IIf(Target < "", Date, "")

End Sub


Regards
Claus B.


Hi Claus

OK I think I've found what the issue is. It works fine on direct entry ,
and for pasting of a single cell. If I want to past more than one cell
then it doesn't react.

So if I paste E1 to D1 then C1 reacts with the date.

If I paste E1:M1 to D1:L1 then C1 doesn't react.

This is where the problem is.

I wonder also if the enable.event command could be built into the code.

Very interesting. Thanks Claus.

Best Wishes


Colin