+ Reply to Thread
Results 1 to 3 of 3

Simple sheet Selection from another workbook using codename

  1. #1
    Registered User
    Join Date
    11-05-2007
    Posts
    54

    Simple sheet Selection from another workbook using codename

    Hello all,

    Really pulling my hair out at the simplest of things today!!

    I've essentially got my macro and a form in my personal workbook.

    When the code is run, the userform loads with a list box with the open workbooks to select the workbook that the Macro needs to be run in.

    As I do not know what the worksheet names are likely to be, all I am trying to do is reference the worksheet code names as the identifier.

    so as you can imagine:

    Please Login or Register  to view this content.
    works great

    however when I get to:
    Please Login or Register  to view this content.
    I get an error??

    Why would this happen? this should be simple cod but errors are causing my hair loss!

    Please Login or Register  to view this content.

    can anyone help with this.... should be simple.... in fact I know it must be!

    Thanks in advance

  2. #2
    Registered User
    Join Date
    11-05-2007
    Posts
    54

    Re: Simple sheet Selection from another workbook using codename

    Scouring the internet it seems that you can't reference a sheet code name from another workbook (where the macro is stored).

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Simple sheet Selection from another workbook using codename

    Why are you using the sheet names?

    Have you tried adding a workbook reference to make sure the code is looking at the correct workbook?

    Also, what is the code actually doing?

    PS If you can't reference a sheet by codename from another workbook why does the code work for Sheet1?
    If posting code please use code tags, see here.

+ 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