View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Richard Buttrey Richard Buttrey is offline
external usenet poster
 
Posts: 296
Default Run a macro when updating a cell

On Mon, 22 Aug 2005 05:17:03 -0700, "Jim Hartley" <Jim
wrote:

I want to run a Macro when the contents of a cell are changed. I am familiar
with running a macro when updating a worksheet or when clicking a button but
can not find the right event for running one when only a cell has changed.


Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Not Intersect(Target, Range("MyCell")) Is Nothing Then
'....Your code
End If


End Sub


(Thanks to Bob Phillips for pointing me in this direction a few months
ago).

Rgds

__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________