Check for updated cell

A

arm

Hello! Is it possible to check for an updated cell or range cell? Thank you
very much in advance.
 
J

JE McGimpsey

If your cell is updated manually (or remotely), use the
Worksheet_Change() event, perhaps something like:

Private Sub Worksheet_Change(byRef Target As Excel.Range)
With Target
If .Count > 1 Then Exit Sub
If .Address(False, False) = "J1" Then _
MsgBox "J1 Changed"
End With
End Sub

Put this in your worksheet code module (right-click the worksheet tab
and choose View Code).

If the cell contains a formula, use the Worksheet_Calculate() event:

Private Sub Worksheet_Calculate()
Static vOldV1 As Variant
If Range("V1").Value <> vOldV1 Then
MsgBox "Cell V1 Changed"
vOldV1 = Range("V1").Value
End If
End Sub

For more, see

http://cpearson.com/excel/events.htm
 
Top