Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Robin,
Use this in the change event: Dim NewVal As Variant Dim OldVal As Variant If Target.Cells.Count < 1 Then Exit Sub NewVal = Target.Value With Application .EnableEvents = False .Undo OldVal = Target.Value .Undo .EnableEvents = True End With MsgBox "The old value was " & OldVal & Chr(10) & _ "The new value is " & NewVal HTH, Bernie MS Excel MVP "strataguru" wrote in message ... I have a vba macro that is kicked off from ThisWorkbook when Workbook_SheetChange event occurs. When the user inputs or updates a value in a cell - I'd like to know the previous value. What object will provide me with that information? Thanks! -Robin -- 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) | |||
How can I copy a value from a cell and paste it into another cell while adding it to the previous value in that cell | Excel Worksheet Functions | |||
Creating Variables Programmically | Excel Discussion (Misc queries) | |||
Edit Data Query Programmically? | Excel Programming | |||
How do I change a function's otional parameter default values programmically | Excel Programming |