View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
alf alf is offline
external usenet poster
 
Posts: 5
Default afterupdate event in Excel

On 30 nov, 07:32, md903 wrote:
I would like to add an AfterUpdate action to a cell to clear the contents of
a second cell. *For example, if the contents of cell A1 changes, I want it to
clear the contents of cell B1. *Cell A1 will be updated manually.


Use WorkSheet "Change" Event, and test the adress of the target cell:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.address = "$A$1" Then
Range("B1") = ""
End If
End Sub