View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Trevor Shuttleworth Trevor Shuttleworth is offline
external usenet poster
 
Posts: 1,089
Default Detect Cell Changes

Starter for 10:

In the Worksheet Class Module (the code behind the worksheet)

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub
Application.EnableEvents = False
If Range("C5") = "" Then
Range("C5").Value = Target.Address(False, False)
Else
Range("C5").Value = Range("C5").Value _
& ", " & Target.Address(False, False)
End If
Application.EnableEvents = True
End Sub

Regards

Trevor


"aga2957" wrote in
message ...

I have an excel sheet that I designed to look like a form. That form has
default values. Now, what I want to do is that, whenever there is a
change in any cell, let's say for example, someone change the value of
A4, that change will be recorded in C5 for example.

Let's have a working example,

A4 default value = 5

When someone change the value of A4, C5 will show A4. Meaning, A4 has
been changed.

So goes with other cells with default values.

Let's say for example, the value of A5 has been changed, then C5 will
now show "A4, A5" meaning, these cells were changed.

Thank you so much for your assistance!


--
aga2957
------------------------------------------------------------------------
aga2957's Profile:
http://www.excelforum.com/member.php...o&userid=25346
View this thread: http://www.excelforum.com/showthread...hreadid=573561