Catch name of range

  • Thread starter Thread starter Steven
  • Start date Start date
S

Steven

If a user choses a range in the Name Box is there a way to catch that range
in a variable after selected?

Thank you,

Steven
 
What do you mean by choosing a range in the Name Box?

You can set a named range to a variable just like any other range.

Set myVar = Range("myNamedRange")

See VBA help titles Referring to Named Ranges
 
The Name Box to the left of the Formula Bar. If the user selects a range
from the Name Box I want to catch the name in a variable.
 
if they've actually clicked it to select the range:

rngname = selection.name.name
 
Try

Selection.Name.Name

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top