View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\)[_1647_] Rick Rothstein \(MVP - VB\)[_1647_] is offline
external usenet poster
 
Posts: 1
Default Simple code makes Excel 2007 crash

Did you put an entry in Column 6 with Row 5 when you tested it? I ask because that code crashes for me also and I think the reason is the unchained set of Worksheet_Change event calls that the first entry initiates.

Rick


"Ron de Bruin" wrote in message ...
Hi Mathieu

No problem here
Do you have the same problem in a new workbook

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Mathieu" schreef in bericht ...
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