Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have applied a name to a collection dispersed cells and want to use the
same as follows but require a correct piece of code for <<???: Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo ws_exit: If Target.Address <<IS A CELL OF THE RANGE NAMED "CELLS" Then MsgBox "YES!" End If ws_exit: Application.EnableEvents = True End Sub -- Thanx in advance, Best Regards, Faraz |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Faraz
Try Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Target, Range("cells")) Is Nothing Then MsgBox "You are within target" End If End Sub -- Jacob "Faraz A. Qureshi" wrote: I have applied a name to a collection dispersed cells and want to use the same as follows but require a correct piece of code for <<???: Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo ws_exit: If Target.Address <<IS A CELL OF THE RANGE NAMED "CELLS" Then MsgBox "YES!" End If ws_exit: Application.EnableEvents = True End Sub -- Thanx in advance, Best Regards, Faraz |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Simply the best!!!
-- Thanx in advance, Best Regards, Faraz "Jacob Skaria" wrote: Hi Faraz Try Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Target, Range("cells")) Is Nothing Then MsgBox "You are within target" End If End Sub -- Jacob "Faraz A. Qureshi" wrote: I have applied a name to a collection dispersed cells and want to use the same as follows but require a correct piece of code for <<???: Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo ws_exit: If Target.Address <<IS A CELL OF THE RANGE NAMED "CELLS" Then MsgBox "YES!" End If ws_exit: Application.EnableEvents = True End Sub -- Thanx in advance, Best Regards, Faraz |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
test dbl click 'target' is part of named range | Excel Programming | |||
pass named range address into variable | Excel Programming | |||
Can you use a Range $N$xx:$Q$xx in Target.Address? | Excel Programming | |||
getting the absolute range address from a dynamic named range | Excel Programming | |||
Address of named range | Excel Worksheet Functions |