![]() |
#16
|
|||
|
|||
![]()
you can setup cell A1 to decide if the macro should run.
info about events :http://www.cpearson.com/excel/events.htm but will work only when you change the value in cell A1,it will not fire when a formula result changes, so this means it will work the same way ![]() How do I run a macro every time a certain cell changes its value? ![]() There is an event called Worksheet_Change which is triggered when a value is entered (it will not fire when a formula result changes). One of the arguments to this event is 'Target' which is a reference to what changed. Since this event will occur whenever a value changes - you can use the target to see if it is the cell you are interested in:Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("A1")) Is Nothing Then Exit Sub Else 'Do whatever you need to do... End If End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Merge Fields and Static Text | kbranden | Mail Merge | 1 | 06-15-2011 09:02 AM |
![]() |
Jeremiahts | Word | 3 | 04-07-2011 09:54 PM |
convert html to text at opening | etfjr | Word | 0 | 12-13-2010 11:14 AM |
Convert Number to Text | devcon | Word | 0 | 07-10-2010 01:16 AM |
![]() |
Dolfie_twee | Word VBA | 1 | 06-22-2010 07:54 AM |