+ Reply to Thread
Results 1 to 8 of 8

Debug this?

Hybrid View

  1. #1
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Hke,

    This should work.

    WksB = gwbB.Names("aName").RefersToRange.Parent.Name
    Set wksA = gwbB.Worksheets(WksB)


    Sincerely,
    Leith Ross

  2. #2
    Registered User
    Join Date
    10-14-2003
    Posts
    7
    I still get the 1004 error on that first line of code.

    debug.print gwbB.Names("aName").RefersToRange.Parent.Name

    also makes a 1004

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Hke,

    Check if WksB contains the Workbook name as well as the Worksheet name by placing a breakpoint in the code next to Set.

    Let know,
    Leith Ross

  4. #4
    Registered User
    Join Date
    10-14-2003
    Posts
    7
    Again, thanks for your effort Leith

    wksB equals Nothing. It is the first line ,

    wksB = gwbB.Names("aName").RefersToRange.Parent.Name

    , that makes the 1004 happen.

    Could a language incompatibility cause this conflict? I suspect this because the names of the sheets in gwbB are displayed as

    "Sheet1 (Sheet1name)"

    in the project browser. However, if do a Sheets.Add in some other project I get the norwegian

    "Ark1(Ark1)"

    in the browser.
    Last edited by hke; 05-11-2005 at 11:06 AM.

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Hke,

    That is certainly a possibility. I didn't realize that this was a multi-lingual setup. Unfortunately, I don't know if or how the code pages could be manipulated to make this work. If you will be using workbooks in both langauges this could be a major obstalce with no easy solutions. Sorry I don't have any other ideas.

    Sincerely,
    Leith Ross

+ 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