Problems using Worksheet_Change
Peres,
This will help you:
Option Explicit
Private Old_data
Private New_data
'
Private Sub Worksheet_Change(ByVal Target As Range)
New_data = Target.Value
MsgBox "Change from '" & Old_data & "' to '" & New_data & "'"
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Old_data = Target.Value
End Sub
--
Regards,
Halim
"Gary''s Student" wrote:
You will need to "remember" the old value by storing it in a static variable.
--
Gary''s Student - gsnu200737
"Peres from Brasil" wrote:
Does someone knows if exist any way of getting the old value in this:
Private Sub Worksheet_Change(ByVal Target As Range)
€˜ for the new data coming is easy:
New_data = Target.Value
€˜And about the old data into the cell€¦. Is there something like:
Old_data = Target.Old_data
End Sub
Thanks a lot
Peres
|