+ Reply to Thread
Results 1 to 3 of 3

Name Referencing Problem

  1. #1
    Forum Contributor
    Join Date
    09-05-2004
    Location
    Melbourne
    Posts
    193

    Name Referencing Problem

    I'm wondering if someone can explain something to me.

    at times this line of code

    target.name.name

    will return RangeName (for example)

    other times it will return 'Sheet1'!RangeName

    The longer name occurs when I import a sheet to a new workbook that already has named ranges but the shorter name will occur if that workbook has no named ranges. I need (or at least would like) for the name to be consistent as I refer to a specific naming structure in my range names in much of my other code.

    TIA

    Richard

  2. #2
    Forum Contributor
    Join Date
    11-29-2003
    Posts
    1,203
    I can't explain what you are seeing, but I can propose a solution.

    For each nm in ActiveWorkbook.Names
    If nm.Name like "*!*" then
    nm.Name = right(nm.Name, Len(nm.Name)-1)
    end if
    next nm

    - Pete

  3. #3
    Forum Contributor
    Join Date
    09-05-2004
    Location
    Melbourne
    Posts
    193
    I've sinced found that my problem has something to do with local and global names and I've grabbed Name Manager by Jan Karel Pieterse and hopefully I'll sort out my problem now.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1