ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Question to Chip Pearson (https://www.excelbanter.com/excel-programming/288355-question-chip-pearson.html)

Doug[_9_]

Question to Chip Pearson
 
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

Chip Pearson

Question to Chip Pearson
 
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" wrote in message
...
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[_9_]

Question to Chip Pearson
 
Chip,

Thank you. thank you. Thank you.

That makes perfect sense.

Thank you.

Doug


All times are GMT +1. The time now is 12:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com