excel - cell value change not getting captured in vba macro -
i want capture when value changes in cell a2
i tried below code not working
private sub worksheet_change(byval target range) if not intersect(target, me.range("h5")) nothing macro end sub
i have breakpoint inside macro not coming till there tried below, no luck
private sub worksheet_change(byval target range) msgbox (target.column) end sub
worksheet_change
takes single parameter target
of type range
. check if have changed range interested in can compare target range, in case:
if target = range("a2") 'do end if
this lets compare range
object range
object minimal fuss.
and put in correct sheet.... :p
Comments
Post a Comment