excel - How can I run a Macro when the value in a specific cell changes? -
let me preface saying new vb...
i trying run macro whenever value in cell changes. i've read on how this, can't seem work. have entered following code private module of worksheet object:
private sub worksheet_change(byval target range) if not intersect(target, target.worksheet.range("$c$5")) nothing application.run _ "'amex payments_experiment.xlsm'!selectcells" end if end sub
c5 cell trying monitor change. "selectcells" macro want run. "amex payments_experiment.xlsm" name of file.
when change value in c5 nothing happens. great. thanks!
update:
cyberkiwi - no, not how did it, when follow you're instructions find code should be. private module of worksheet object right clicked sheet tab @ bottom, selected "view code", selected "worksheet" dropdown in top center of page.
user587834 - yes. macro's enabled.
any other suggestions?
if use excel2007 sure macros enabled, default excel 2007 deactivate macro execution new workbook. try execute other macro sure macros enabled.
Comments
Post a Comment