Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Event when a specific cell changes
Hi,
I want to run a macro after a specific cell value changes. Cell A5 has a dropdown menu from which you have to choose one value. After selecting I'd like a macro to start. Have tried Event Workbook_Change but I'm doing something wrong because it reacts on every cell change. Cheers, Harold |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Event when a specific cell changes
That workbook_Change event is going to fire each time you make a change to the
worksheet. But you can get out of the procedure as soon as you realize you're not changing the cell you want to check. Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) if target.cells.count 1 then exit sub 'only one cell at a time end if if intersect(target, me.range("A1")) is nothing then 'get out exit sub end if 'code to do real stuff here. End Sub To check specific cells: if intersect(target, me.range("A1,c9,x92")) is nothing then or for any cell in column A if intersect(target, me.range("A:A")) is nothing then mohavv wrote: Hi, I want to run a macro after a specific cell value changes. Cell A5 has a dropdown menu from which you have to choose one value. After selecting I'd like a macro to start. Have tried Event Workbook_Change but I'm doing something wrong because it reacts on every cell change. Cheers, Harold -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Change Event on a Specific Cell | Excel Worksheet Functions | |||
change event on specific cell rather than worksheet | Excel Discussion (Misc queries) | |||
Link from a specific Cell in Excel to a specific para. in Word | Excel Worksheet Functions | |||
Event macro that targets specific worksheet | Excel Discussion (Misc queries) | |||
in vba what command is used to determine if a particular cell on a particular sheet changed? some kind of event? how to get the old and new value of the cell? | Excel Worksheet Functions |