View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Worksheet_Change

No, there isn't an alternative

Private Sub Worksheet_Change(ByVal Target As Range)
If target.Address = "$B$9" then
if isempty(Target.Value) then
Application.EnableEvents = False
application.Undo
v = Target.Value
Target.ClearContents
Range("IV10").Value = v
Application.EnableEvents = True
end if
End Sub

--
Regards,
Tom Ogilvy

End Sub



"noname" wrote:

I would like to know if its possible to first CHECK if Cell.value (its
a value of a Data Validation Dropdown) is being deleted using DELETE
button on keyboard, & then capture this initial value of the Cell &
write it to a Helper worksheet along with the Cell.address &
Cell.Offset(0,1).value.

This Cell.value, will be used later to do a .Find in a column of Names
on another worksheet & then deduct this amount from the value in the
offset of the Found Cell (e.g. Sam).

Please note i am using the worksheet_Change event.

If there is an alternative Function or Sub to check for cell deletion
(using Delete button), then please let me know.

Sheet1
---------
A B
Row2 Sam 20


Sheet2
---------
A B C
Sam 20 $A$2


Sheet3
---------
A B
Sam 150 (later, should be 150-20=130)


Looking forward to your valued suggestions.