0

I have a macro-enabled spreadsheet with several named ranges, with vba references to those named ranges (I use named ranges rather than the default so that I can move them around without breaking all of my references). What I want to do is to be able to pull the custom name of the cell that is selected by the user in a SelectionChange event. What I have right now is:

Select Case Target.Name
Case "A"
...etc,

However, Target.Name only returns the A1-style name of the cell, and not the custom name that is assigned to the cell. Is there any other property that I should be using? Any and all help would be greatly appreciated.

Community
  • 1
  • 1
Roman B.
  • 23
  • 3

1 Answers1

2

You actually need the Name property of the Name object:

Select Case Target.Name.Name
Rory
  • 32,730
  • 5
  • 32
  • 35