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
 
Back
Top