Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Range name applies to list, or simply range; collection-index/member-ofprecedence

I must be doing something different from what you have in mind. When
I do Insert-Name-Define, I see the named ranges, including the names
that I'm not sure whether they are attached to fixed ranges, or list
ranges). When I click F5, I also see those names.

Furthermore, I did some tests in VBA., where "TheName" is the name
which I'm not sure refers to a List or a fixed Range.

Works:
nRows = _
Sheets("SheetName").ListObjects(1).ListRows.Count

Works:
nRows = _
Sheets("SheetName").Range("TheName").Rows.Count

Doesn't Work:
nRows = _
Sheets("SheetName").ListObjects("TheName").ListRow s.Count

The fact that "TheName" isn't accepted as an index to collection
ListObjects implies (doesn't prove) that "TheName" is associated with
fixed Range rather than a list. However, when I add/remove rows to/
from the list in Excel, the range associated with "TheName" updates
accordingly. Would you have any insight that can help make sense of
this?

I also was wondering about operator precedence. It seems that the
member-of function (the dot/period) has the same precedence as the
collection indexing function (brackets following a collection name,
enclosing either a numerical or string index). These seem to be
evaluated from left to right. Is this correct?

Finally, where is it documented what arguments accepted within the
indexing brackets for a ListObjects collection? In C++/STL, there
would be constructors for this, but this is a different environment
that I am still trying to get the subtleties of.

Thanks!

On May 12, 10:16*am, "Don Guillett" wrote:
If it is a defined name you will not see it in the list. So,
insertnamedefine
now you will see the list for all (if not hidden by vba)

wrote:
I can see the selection if type in the name (or even just click on the
name in the list). *That selects the range. *It still doesn't indicate
whether the name is attached to a fixed boundary range, or a dynamic
boundary list.

On May 12, 8:17 am, "Don Guillett" wrote:

f5gototype in the name to see the selection


wrote:
In Excel 2003, if I go through the pull-down menus to define a range
name, I can see the bounding spreadsheet coordinates for the various
named ranges. (Don't have access to the machine with Excel at the
moment, so sorry if this is a bit vague, but I think the menu
traversals might be something like Insert-Name-Define).


Is there a way to determine whether the names apply to a simple range,
or a list? Currently, my way of testing that is to insert rows into a
list and see whether the range coordinates for the list name changes.
There must be a more direct way than to muss around with my list.

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
criteria applies to a range of dates. pebbles Excel Discussion (Misc queries) 3 May 6th 08 01:13 AM
Referring to a member of the workbooks collection by name. Andrew[_3_] Excel Programming 5 May 11th 07 11:34 AM
Condensing a list/range with blank cells to a new list/range without blanks KR Excel Worksheet Functions 4 July 5th 05 04:23 PM
Range collection Ernst Guckel[_4_] Excel Programming 4 May 1st 05 08:01 PM
Cell is a Member of a range or Not pgjoshi Excel Programming 3 March 6th 04 02:08 PM


All times are GMT +1. The time now is 09:41 AM.

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

About Us

"It's about Microsoft Excel"