LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 465
Default Event recognition.


Hi

I use this code to look at cells in column D. If any has new content ,
then it puts the date in the adjacent cell in column C :


Private Sub Workbook_SheetChange(ByVal Sh As Object, _
ByVal Target As Range)

On Error GoTo enditall
Application.EnableEvents = False
If Intersect(Range(Target(1).Address), _
Range("D:D")) _
Is Nothing Then GoTo enditall
With Target
If .Value < "" Then
With .Offset(0, -1)

'Put in todays date :

.Value = Date

End With
Else: .Offset(0, -1).Value = ""
End If
End With
enditall:
Application.EnableEvents = True
End Sub


Unfortunately , it doesn't work when pasting content from other cells
into the cell in D. It only works when making direct typed entries. Can
someone suggest an amendment which would update after any entry (pasted
or directly entered) to the cell in D?



Best Wishes


 
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
Text Recognition Nivek Excel Discussion (Misc queries) 2 October 21st 08 12:56 PM
Barcode recognition carrieann Excel Discussion (Misc queries) 1 March 18th 08 02:26 AM
Alphanumeric Recognition NewToVB Excel Programming 2 January 25th 08 04:39 PM
Formula for recognition JamesInNeedFootballInDeed Excel Discussion (Misc queries) 6 December 30th 07 07:00 AM
Letter recognition General[_2_] Excel Programming 2 May 13th 07 09:59 AM


All times are GMT +1. The time now is 11:32 PM.

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"