Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
worksheet change based on target range
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
worksheet change based on target range
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.W. Aldridge" wrote: 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
worksheet change based on target range
Suggest change
If target = Intersect(target, sRng) Then to If Not Intersect(target, sRng) Is Nothing Then Regards, Peter T "JLGWhiz" wrote in message ... 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.W. Aldridge" wrote: 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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
worksheet change based on target range
Probably less likely to throw an Oject Variable Not Set error that way.
Thanks Pete. "Peter T" wrote: Suggest change If target = Intersect(target, sRng) Then to If Not Intersect(target, sRng) Is Nothing Then Regards, Peter T "JLGWhiz" wrote in message ... 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.W. Aldridge" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Add Borders based on ByVal Target As Range | Excel Programming | |||
Need to determine the ROW of the TARGET in a Worksheet Change Even | Excel Programming | |||
Excel VBA Target Worksheet change | Excel Discussion (Misc queries) | |||
Worksheet Change Event- Refer to Target Address By Name | Excel Programming | |||
Many Sub Worksheet_Change(ByVal Target As Range) In One Worksheet | Excel Programming |