![]() |
Getting pre edit values
I am using Worksheet_Change to identify edits on a sheet and highlight the
changes where appropriate by testing on the Target object. What I really need is to be able to retrieve the value of the cell before the edit is done, i.e. if the cell is changed from 2 to 3 I need to retieve the value 2. Is this possible?? Tnanks in advance for any help on this. |
Getting pre edit values
In the change event,
store the current value of the changed cell Disable Events Application.Undo store the value of the changed cell (this is the 2 in your example) write the first value you stored enable events -- Regards, Tom Ogilvy "aps" wrote in message ... I am using Worksheet_Change to identify edits on a sheet and highlight the changes where appropriate by testing on the Target object. What I really need is to be able to retrieve the value of the cell before the edit is done, i.e. if the cell is changed from 2 to 3 I need to retieve the value 2. Is this possible?? Tnanks in advance for any help on this. |
Getting pre edit values
Thanks Tom, neet solution works wonderfully. Would be good if 'pre edit
value' was an attribute on the Target object though. Next release maybe. "Tom Ogilvy" wrote: In the change event, store the current value of the changed cell Disable Events Application.Undo store the value of the changed cell (this is the 2 in your example) write the first value you stored enable events -- Regards, Tom Ogilvy "aps" wrote in message ... I am using Worksheet_Change to identify edits on a sheet and highlight the changes where appropriate by testing on the Target object. What I really need is to be able to retrieve the value of the cell before the edit is done, i.e. if the cell is changed from 2 to 3 I need to retieve the value 2. Is this possible?? Tnanks in advance for any help on this. |
All times are GMT +1. The time now is 08:13 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com