Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim v as Variant
Dim vOld as Variant
if target.count > 1 then exit sub
if Target.Column = 6 then
v = Target.Value
On Error goto ErrHandler
Application.EnableEvents = False
application.Undo
vOld = Target.Value
Target.Value = v
msgbox "New: " & v & vbNewline & _
"Old: " & vOld
End If
ErrHandler:
Application.EnableEvents = True
End Sub
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.