Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
excel 2000
trying to reference changed cells by their cell name in a case statement with no luck code is something like this, have tried target.range, target.name, etc can't seem to find the right combination of target as and select case Sub Worksheet_Change(ByVal Target As Excel.Range) Select Case Target.Range Case Target.Range("cellName1"), Target.Range("cellName2"), etc or Select Case Target.name Case Target.name("cellName1"), Target.name("cellName2"), etc i'm thinking there is some way to do this, yes?????? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this:
Sub Worksheet_Change(ByVal Target As Excel.Range) On Error Resume Next 'in case target does NOT have a name! Select Case Target.Name.Name 'yes, .Name.Name! Case "CellName1", "CellName2" ..... Case "MyName3" ... End Select End Sub Bob Umlas Excel MVP "bbxrider" wrote in message ... excel 2000 trying to reference changed cells by their cell name in a case statement with no luck code is something like this, have tried target.range, target.name, etc can't seem to find the right combination of target as and select case Sub Worksheet_Change(ByVal Target As Excel.Range) Select Case Target.Range Case Target.Range("cellName1"), Target.Range("cellName2"), etc or Select Case Target.name Case Target.name("cellName1"), Target.name("cellName2"), etc i'm thinking there is some way to do this, yes?????? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
name.name is bizare but works, thanks a lot
"Bob Umlas" wrote in message ... Try this: Sub Worksheet_Change(ByVal Target As Excel.Range) On Error Resume Next 'in case target does NOT have a name! Select Case Target.Name.Name 'yes, .Name.Name! Case "CellName1", "CellName2" ..... Case "MyName3" ... End Select End Sub Bob Umlas Excel MVP "bbxrider" wrote in message ... excel 2000 trying to reference changed cells by their cell name in a case statement with no luck code is something like this, have tried target.range, target.name, etc can't seem to find the right combination of target as and select case Sub Worksheet_Change(ByVal Target As Excel.Range) Select Case Target.Range Case Target.Range("cellName1"), Target.Range("cellName2"), etc or Select Case Target.name Case Target.name("cellName1"), Target.name("cellName2"), etc i'm thinking there is some way to do this, yes?????? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
using the Excel generic worksheet names instead of user-given names in code | Excel Discussion (Misc queries) | |||
Code names for excel sheets | Excel Discussion (Misc queries) | |||
Sheet names code | Excel Discussion (Misc queries) | |||
Counting names thru code | Excel Programming | |||
Use VBE Sheet names in code | Excel Programming |