Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Named Range in Worksheet_Change event
I have the following IF statement in my worksheet_Change event
If Not Intersect(Target, Range("A1:A20")) Is Nothing Then I'd like to replace "A1:A20" with a named range. What do I need to change to get this to work. Let's say the named range is "BARB" for this example. Thanks, Barb Reinhardt |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Named Range in Worksheet_Change event
try this...
If Not Intersect(Target, Range("BARB")) Is Nothing Then -- HTH... Jim Thomlinson "Barb Reinhardt" wrote: I have the following IF statement in my worksheet_Change event If Not Intersect(Target, Range("A1:A20")) Is Nothing Then I'd like to replace "A1:A20" with a named range. What do I need to change to get this to work. Let's say the named range is "BARB" for this example. Thanks, Barb Reinhardt |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Named Range in Worksheet_Change event
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Me.Range("BARB")) Is Nothing Then With Target 'do your stuff End With End If ws_exit: Application.EnableEvents = True End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Barb Reinhardt" wrote in message ... I have the following IF statement in my worksheet_Change event If Not Intersect(Target, Range("A1:A20")) Is Nothing Then I'd like to replace "A1:A20" with a named range. What do I need to change to get this to work. Let's say the named range is "BARB" for this example. Thanks, Barb Reinhardt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Worksheet_Change Event with Range Protection | Excel Discussion (Misc queries) | |||
Lock or Unlock Range of Cells on Worksheet_Change Event | Excel Worksheet Functions | |||
Change event triggered by a named range | Excel Programming | |||
Change Event on a named range | Excel Programming | |||
Worksheet_Change Event | Excel Programming |