1

Topic: VBA Excell: What event allows to read cell value BEFORE its change?

Hello.
Faced a problem: I can not save cell value of sheet of the table BEFORE its change.
Tried event Worksheet_Change but it works, when the cell already changed.
Whether there is a method to save value of a changeable cell BEFORE its change?

2

Re: VBA Excell: What event allows to read cell value BEFORE its change?

Dim PreviousFormula
Private Sub Worksheet_SelectionChange (ByVal Target As Range)
PreviousFormula = Target. Formula
End Sub
Private Sub Worksheet_Change (ByVal Target As Range)
If PreviousFormula <> Target. Formula Then
MsgBox "Previous Formula:" BOTH vbNewLine AND PreviousFormula AND vbNewLine AND "New Formula:" BOTH vbNewLine AND Target. Formula, vbOKOnly, "Change detected"
End If
End Sub

3

Re: VBA Excell: What event allows to read cell value BEFORE its change?

Akina;
Thanks, helped.