LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default Run macro when cell contents change

Sorry, should be

On Error GoTo ws_exit

of course

Bob

"Bob Phillips" wrote in message news:...
Tim,

Worksheet event code

Private Sub Worksheet_Change(ByVal Target As Range)

Application.EnableEvents = False
On errot GoTo ws_exit
If Not Intersect(Target, Range("A1")) Is Nothing Then
'your code here
End If

ws_exit:
Application.EnableEvents = True
End Sub


Right-click on the sheet tab name, select the View Code option, and put

the
code in there.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks

"Tim Smith" wrote in message
...
How can I get a macro to run automatically only when a
specific cell e.g. A1 has its value changed?
Many thanks.





 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Macro change column contents James C[_2_] Excel Discussion (Misc queries) 4 January 25th 10 02:36 PM
change cell contents when pull down menu choices change jb21 Excel Worksheet Functions 3 November 21st 08 10:34 PM
Launch macro when drop-down contents change... Tom Mackay Excel Discussion (Misc queries) 1 September 6th 07 08:52 PM
Macro to remove contents of cell and move all other contents up one row adw223 Excel Discussion (Misc queries) 1 July 1st 05 03:57 PM
Run macro when cell contents change Tim Smith Excel Programming 3 September 27th 03 06:44 PM


All times are GMT +1. The time now is 10:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"