Named range in VBA

  • Thread starter Thread starter Cuperman007
  • Start date Start date
C

Cuperman007

Hi All,

Is it possible to access a named worksheet range in VBA? What type
would that return?

Thanks,
Mark
 
You could use:

Dim myRng as range
set myrng = thisworkbook.worksheets("somesheet").range("somename")

and it would return a range variable.

You could also go through the Names collection
dim myRng as range
set myrng = thisworkbook.names("somename").referstorange
 

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