View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mathieu[_2_] Mathieu[_2_] is offline
external usenet poster
 
Posts: 2
Default Simple code makes Excel 2007 crash

Hello All,

I use this code to check if a value changes in a specific column and update
the adjacent cell (one to the right) with today's date.
However, it makes Excel 2007 crash.

Any advice?


Private Sub Worksheet_Change(ByVal Target As Range)
If ((ActiveCell.Column = 6) And (ActiveCell.Row 5)) Then
ActiveCell.Offset(0, 1).Value = Str(Date)
End If
End Sub

Thanks!
Mathieu