defined name question

  • Thread starter Thread starter Todd
  • Start date Start date
T

Todd

If in a spreadsheet, I have a defined name, (=Numbers!$a$1), can I
use it as a range name in a sub? If so, how do I select and activate
it?
 
Yes, you can use your name in the code.

One way is like this: ThisWorkbook.Sheets(1).Range("ToddsName") = 999

BTW, you do not need to select and activate the range to use the value it
contains. Just refer to it in the code.

Cheers,

FK
 
As posed, the range doesn't have a defined name.
=Numbers! is the the sheet to which you refer
and the cell address is cell A1

In your code, you can reference that cell as
Worksheets("Numbers").Range("A1")

If you had named the cell eg myCell then
Worksheets("Numbers").Range("myCell")
is how you can explicit address it

Kevin Beckham
 

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