View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
philip philip is offline
external usenet poster
 
Posts: 5
Default Run macro when cell contents change

In VBA module in "ThisWorkbook" capture the
SelectionChange event. If the address of the target is
the correct cell address, then execute code.

Example :

Sub Worksheet_SelectionChange (ByVal Target as Range)
If Target.Address = "$A$1" then
' put your code here
end if
End Sub
-----Original Message-----
How can I get a macro to run automatically only when a
specific cell e.g. A1 has its value changed?
Many thanks.
.