Thread: Code Bug
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
btadams[_2_] btadams[_2_] is offline
external usenet poster
 
Posts: 1
Default Code Bug

It seems to work for me. One thing you may want to do when you'r
changing a cells value using the Worksheet_Change event is to tur
events off before changing the cell and turn it back on afterwards:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Not Intersect(Target, Range("A8:$A700")) Is Nothing Then
If Not IsEmpty(Target) Then
If UCase(Target.Value) = "Y" Then
Application.EnableEvents = False
Target.Offset(0, 3).Value = Now()
Target.Offset(0, 3).NumberFormat = "dd/mm"
Target.EntireColumn.AutoFit
Application.EnableEvents = True
End If
End If
End If
End Su

--
Message posted from http://www.ExcelForum.com