LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Define Names / RefersToRange

Look at my previous response. I can't duplicate that behavior. It works
fine for me.

Try this. With locActive_Template as the active sheet, run this code

set rng = Union(range("P49"),range("P86"))
rng.name = "MyName"

msgbox thisworkbook.Names("MyName").RefersTo

Again, that code works for me.

--
Regards,
Tom Ogilvy

"Andre Achtermeier" wrote in message
...
hi,

thanx for the fast response.

=locACTIVE_Template!$P$49;locACTIVE_Template!$P$86

is the Range which Excel adds after selecting the cells with
"Insert-Names..."

when i select only 1 cell everything works fine,
but the cells represent 2 different ranges (P49 AND P86)
the code fails, because the Range Object from RefersToRange is NOTHING....




"Tom Ogilvy" wrote in message
...
Note that I used a comma rather than a semicolon, but since you are in
Germany, a semicolon is probably appropriate.

--
Regards,
Tom Ogilvy

"Andre Achtermeier" wrote in

message
...
hi,

i defined a Name "MyName" like

=locACTIVE_Template!$P$49;locACTIVE_Template!$P$86

in VBA i wrote

Dim rng As Range
Set rng = ActiveWorkbook.Names("MyName").RefersToRange

but the code fails and the RefersToRange is nothing.

any idea?



--
André Achtermeier
----------------------------------------------
www.appliedtechnologies.de
----------------------------------------------








 
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
Questions on Define Names AccessHelp Excel Discussion (Misc queries) 3 November 10th 08 03:43 PM
Invalid define names Noreaster Charts and Charting in Excel 6 October 30th 08 01:48 AM
Define Names in Excel Dave T at home Excel Discussion (Misc queries) 2 November 1st 05 03:27 PM
how to define range names anton New Users to Excel 1 October 14th 05 08:28 AM
alternate UI for Define Names ?? jmg092548 Excel Discussion (Misc queries) 2 August 11th 05 01:32 PM


All times are GMT +1. The time now is 12:42 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"