Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Range Selection

I created a bunch of named ranges by scanning the headers of a table and
creating named ranges that match the header names. Thes appear normally in
the names dialog box, with the correct ranges.

Yet when I try to access one of the ranges as in

With range("myrange")
(Attributes or code
End with

I get an error message.


???




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Range Selection


hi Hydra,

Can you please quote the error message?

To try & narrow it down...
Is the range on the active sheet of the active workbook?
What is the code inside the With statement?
Are there multiple sheets with the samed named ranges?

Rob


--
broro183

Rob Brockett. Always learning & the best way to learn is to
experience...
------------------------------------------------------------------------
broro183's Profile: http://www.thecodecage.com/forumz/member.php?userid=333
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=105711

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default Range Selection

You will improve your chances of getting a useful reply if you provide...
Your Excel version
Your operating system
The error number
The error description
The code line that causes the error
Where the code is located (which module)
What steps you have taken to fix the error
--
Jim Cone
Portland, Oregon USA



"Hydra"
wrote in message
I created a bunch of named ranges by scanning the headers of a table and
creating named ranges that match the header names.
Thes appear normally in the names dialog box, with the correct ranges.
Yet when I try to access one of the ranges as in

With range("myrange")
(Attributes or code
End with

I get an error message.
???




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Range Selection

I'm using windows xp and Excel 2003

I created the ranges using

..Names.AddName:= ColumnHeader, RefersTo:= ColumnRange

where Columnheader is a verable that holds the column name and column range
is a variable that reads in the desired columnrange.

I could not use

ActiveSheet.Range.Name = "rngResource".Activate

Where "rngResource" is one of the range names, although this is copied right
out of the help screen. This throws a syntax error message.



Set ColumnHeader = Worksheets("Sheet1").Range(Columnrange) because it
confused the variable with the column name and accused me of trying to set a
duplicate DIM statement or assignment.

In any case the range names appear to be there and assigned properly.

The With Range("range") format threw and error message that said

"Method Range of Object Global Failed"

?????







"Jim Cone" wrote:

You will improve your chances of getting a useful reply if you provide...
Your Excel version
Your operating system
The error number
The error description
The code line that causes the error
Where the code is located (which module)
What steps you have taken to fix the error
--
Jim Cone
Portland, Oregon USA



"Hydra"
wrote in message
I created a bunch of named ranges by scanning the headers of a table and
creating named ranges that match the header names.
Thes appear normally in the names dialog box, with the correct ranges.
Yet when I try to access one of the ranges as in

With range("myrange")
(Attributes or code
End with

I get an error message.
???





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
Narrow Range based on Selection in Another Range David Excel Discussion (Misc queries) 3 July 1st 07 05:12 PM
Range(Selection, Selection.End(xlToRight)).Select Dave Birley Excel Programming 2 June 6th 07 04:53 PM
Identifying a selection of a selection of a range swimfast Excel Worksheet Functions 1 March 1st 07 02:51 AM
Excel VBA - Range(Selection, Selection.End(xlDown)).Name issue. jonH Excel Programming 3 June 7th 04 09:13 PM
Creating range name for a range selection Mervyn Thomas Excel Programming 1 January 26th 04 05:18 PM


All times are GMT +1. The time now is 02:35 PM.

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"