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: 1
Default Worksheet Change Event - track changes


Really helpful, thanks!!



Jacob Skaria;582812 Wrote:
Hi Karen

Try the below which makes use of Worksheet Change and Selection events
to
track real changes made to the worksheet. Select the sheet tab which
you want
to work with. Right click the sheet tab and click on 'View Code'. This
will
launch VBE. Paste the below code to the right blank portion. Get back
to to
workbook and try out.


Dim varData As Variant
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Range("A2:N5000")) Is Nothing
Then
If Target.Count = 1 And Target.Value < varData Then
Application.EnableEvents = False
Range("P" & Target.Row) = Now()
Application.EnableEvents = True
End If
End If
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
varData = Target.Value
End Sub

--
Jacob


"karen" wrote:

I'm looking for an easy way to track changes in a large spreadsheet
Could someone help me with code to add a date into column P if any

changes
are made in the row. The range that this needs to apply to are is

A2:N5000

I know this is a worksheet change event but don't understand the

mechanics
of writing the code to do what I want



--
Karen Mckenzie
------------------------------------------------------------------------
Karen Mckenzie's Profile: 1287
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=161285

Microsoft Office Help



 
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 to export/save the track change history into another worksheet? jeer Excel Programming 0 January 11th 06 09:32 PM
Change Event Track Rafael Excel Programming 1 February 10th 05 04:39 PM
Change Cell from Validated List Not Firing Worksheet Change Event [email protected] Excel Programming 3 October 4th 04 03:00 AM
Using VBA to track changes in a worksheet - help! Event procedure?? a Excel Programming 7 June 24th 04 01:36 PM


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