LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Worksheet Change Event

How about:

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)

Dim myCell As Range
Dim myRngToCheck As Range

Set myRngToCheck = Me.Range("b:B")

If Intersect(Target, myRngToCheck) Is Nothing Then Exit Sub

On Error Resume Next
Application.EnableEvents = False
For Each myCell In Intersect(Target, myRngToCheck).Cells
With myCell
If IsError(.Value) Then
'do nothing???
ElseIf .Value = "" Then
.Offset(0, 24).ClearContents
Else
.Offset(0, 24).Value = Now
.Offset(0, 24).NumberFormat = "mm/dd/yyyy hh:mm"
End If
End With
Next myCell
Application.EnableEvents = True

End Sub

Since you might be doing lots of things, this one just flies by any errors and
keeps going.



"nrage21 <" wrote:

no solution? :(

Can the code be disable when deleting rows?

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


--

Dave Peterson



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Worksheet Change event LAF Excel Discussion (Misc queries) 3 January 4th 06 02:08 AM
Worksheet Change Event TonyM Excel Discussion (Misc queries) 8 March 11th 05 12:52 PM
worksheet change event gautamvt Excel Programming 1 December 10th 03 05:15 PM
Worksheet change event Helen Trim[_3_] Excel Programming 0 September 23rd 03 03:00 PM
Worksheet Change Event Help Please J P Singh Excel Programming 1 July 16th 03 09:37 AM


All times are GMT +1. The time now is 11:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"