Thread: Auto Dates
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Merle Merle is offline
external usenet poster
 
Posts: 3
Default Auto Dates

I am using Excel 2000 and this code in sheet 1 and it works fine. What I want
to do is change the range to A2 to M6. When I replace "A" with "A1:M6" it
will not work. Can anyone help me with this?

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'when entering data in a cell in Col A
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 1 Then
n = Target.Row
If IsNumeric(Excel.Range("A" & n).Value) And _
Excel.Range("A" & n).Value 1 Then
Excel.Sheets(2).Range("A" & n).Value = "paid" & Format(Now, "
mm/dd")
End If
End If
enditall:
Application.EnableEvents = True
End Sub