PDA

View Full Version : Detect Change in Row . .



OrphanBear
05-04-2009, 02:51 PM
Hi All,

I am trying to create a code in the Worksheet_selectionchange event. I have hundreds of rows of data in a sheet. Each row of data is one unique project. What I am trying to do is figure out if any cell in a specific row has changed, and place a date at the end of that row idicating the date of the change. The data in the row may be changed either through manual entry, validation lists or formula. I would be grateful for any help . .I asked for help in a different thread but had no response.

Bob Phillips
05-04-2009, 04:34 PM
Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit
Application.EnableEvents = False

With Target

Me.Cells(.Row, "Z").Value = Now
Me.Cells(.Row, "Z").NumberFormat = "dd mmm yyy hh:mm:ss"
End With

ws_exit:
Application.EnableEvents = True
End Sub


This is worksheet event code, which means that it needs to be
placed in the appropriate worksheet code module, not a standard
code module. To do this, right-click on the sheet tab, select
the View Code option from the menu, and paste the code in.

OrphanBear
05-04-2009, 05:00 PM
THANK YOU!

Greg T
05-05-2009, 06:32 AM
OrphanBear,

This thread appears to be a cross post of the following post on MrExcel.com

http://www.mrexcel.com/forum/showthread.php?t=388093


If it is not a crosspost, then quit posting homework assignments on the web. If it is a crosspost, then please see here: http://www.excelguru.ca/node/7

mdmackillop
05-05-2009, 07:17 AM
Thanks Greg.