Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In Excel 2002 event:
Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) Target.Text is the cell's value *after* changing. How do I get the cell's value *before* the change? Excel 2002 Help lists no such event. Object Sh seems to be null. And a Range object doesn't have a "PreviousValue" property, does it? Two, if that functionality exists, how do I cancel the change and prevent the cell from updating? My purpose is: I need to prohibit users from copying cells to targets that already have data. In that case I want them to rekey the new value (s) manually. I'm getting burned by people overwriting whole ranges of data and screwing themselves up. (If they want to copy data to a blank target, that's OK. Solving the problem by, say, requiring them to lock/ unlock cells would be an impossible kludge.) It seems that the event above should rather be called Workbook_AfterSheetChange, shouldn't it? So where's its Before partner? Thanks much. *** |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
PUTTING VBA'S TOGETHER | Excel Worksheet Functions | |||
working with 2 or vba's on the same sheet | Excel Programming | |||
Conflicting VBA's | Excel Programming | |||
Bug in Excel's (not VBA's) MOD function | Excel Discussion (Misc queries) | |||
VBA's Future | Excel Programming |