View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default OnChange Event for a Cell

Right click on the sheet tab and select view code.

In the left dropdown, select Worksheet and in the right dropdown select
Change (dropdowns at top of code module).

This puts in a declaration for the change event which is fired whenever a
cell is edited or is updated with a DDE link (xl2000 and beyond).

In the event, you can use an if statement to see if it was a change to A1
that triggered the event. Target holds a reference to the cell/cells that
triggered the event

Private Sub Worksheet_Change(ByVal Target As Range)
if Target.Address = "$A$1" then

code to perform something

End if
End Sub

--
Regards,
Tom Ogilvy

"Michael Kintner" wrote in message
...
Where do I find the OnChange Event for a cell.

For example Cell A1. I change the value in the cell I would like to

perform
something. How do I create it or find it?

Thank you for your help in advance!!! (smile)

Mike