Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Like this
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 -- Regards, Tom Ogilvy "strataguru" wrote in message ... Thanks for the reply. I'm curious - how does Excel 'undo' cell values then? Thanks! -- strataguru ------------------------------------------------------------------------ strataguru's Profile: http://www.excelforum.com/member.php...fo&userid=1313 View this thread: http://www.excelforum.com/showthread...hreadid=262910 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
3-Color Scale Vlookup for Current Month/Previous/Pre-Previous | Excel Discussion (Misc queries) | |||
Creating Variables Programmically | Excel Discussion (Misc queries) | |||
View previous cell value programmically | Excel Programming | |||
Edit Data Query Programmically? | Excel Programming | |||
How do I change a function's otional parameter default values programmically | Excel Programming |