afterupdate event in Excel

  • Thread starter Thread starter md903
  • Start date Start date
M

md903

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.
 
I would like to add an AfterUpdate action to a cell to clear the contentsof
a second cell.  For example, if the contents of cell A1 changes, I wantit 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top