worksheet change based on target range

J

J.W. Aldridge

Want to automatically run macro if range within worksheet is changed
in any way.

Range is L15:L1000.

Maco name is "stank".

Please assist....

Thanx
 
J

JLGWhiz

This assumes that stank is in the standard code module1 and that this code
will be put into the applicable sheet code module.

Private Sub Worksheet_Change(ByVal target As Range)
Set sRng = Range("L15:L1000")
If target = Intersect(target, sRng) Then
stank
End If
End Sub
 
J

JLGWhiz

Probably less likely to throw an Oject Variable Not Set error that way.
Thanks Pete.
 
Top