Question to Chip Pearson

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Chip,

In my earlier posting, thank you for clarifying what the Change procedure does and how it operates.

Can you recommend what I can use to "trap" both manual changes, changes made via VBA code and when a value is changed due to a formula calculation?

Thanks.

Doug
 
Doug,

You can use the Change event to capture changes made by the user
or VBA code. You can use the Calculate event to capture changes
made by calculation of the cell:

Private Sub Worksheet_Calculate()
Static OldA1 As Variant
If IsEmpty(OldA1) = True Then
OldA1 = Range("A1").Value
Else
If Range("A1").Value <> OldA1 Then
MsgBox "A1 Changed From: " & OldA1 & " to " &
Range("A1")
End If
End If
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



Doug said:
Chip,

In my earlier posting, thank you for clarifying what the Change
procedure does and how it operates.
Can you recommend what I can use to "trap" both manual changes,
changes made via VBA code and when a value is changed due to a
formula calculation?
 
Back
Top