LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Cell Update on Paste

I have the following code, which works terrificially.

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "F18:F450"

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
If .Value < "" Then
.Offset(0, -5).Value = Format(Date, "dd-mmm-yyyy")
End If
End With

End If

Const WS_RANGE_1 As String = "F18:L450"

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE_1)) Is Nothing Then
With Target
If .Value < "" Then
Range("B2").Value = Format(Date, "dd-mmm-yyyy")
End If
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

I use it to update a cell with the current date when something in the
specific range changes. What I normally do on this particular sheet is to
paste values in, because others update the information on the spreadsheet.
What I would like to happen is that when I paste information in from the
clipboard that the date in B2 gets updated with the current date after the
paste.

What do I need to do to modify my code to allow that to happen?

thanks for letting me know.
Terry
 
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
How will hyperlink cell reference update after copy paste? bjry Excel Worksheet Functions 2 May 12th 09 05:10 PM
Data Validation lists update orginal cell with list update [email protected] Excel Worksheet Functions 3 July 11th 08 07:56 AM
Need to paste/update info to correct row. Lonpuz Excel Programming 0 January 20th 08 05:51 PM
Update value of variable from one sheet to paste into another shee tibbs Excel Programming 4 October 4th 06 06:30 PM
Paste Functions and Update info jackle Excel Worksheet Functions 2 May 24th 05 06:55 PM


All times are GMT +1. The time now is 08:39 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"