worksheet change based on target range

  • Thread starter Thread starter J.W. Aldridge
  • Start date Start date
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
 
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
 
Probably less likely to throw an Oject Variable Not Set error that way.
Thanks Pete.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top