Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default defined name question

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default defined name question

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




wrote in message
...
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?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default defined name question

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

-----Original Message-----
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?
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run-time error '50290': Application-defined or object-defined erro Macro button Excel Discussion (Misc queries) 1 March 12th 09 10:59 AM
"User-defined type not defined" message in Excel RW1946 Excel Discussion (Misc queries) 0 August 31st 05 12:14 PM
A Question on User Defined Functions. ajames54 Excel Programming 2 October 8th 03 03:15 PM
Application-defined or object-defined error Meihua Liang Excel Programming 0 September 8th 03 07:25 PM
Application-defined or object-defined error jaf Excel Programming 0 September 8th 03 07:01 PM


All times are GMT +1. The time now is 10:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"