+ Reply to Thread
Results 1 to 9 of 9

Selecting sheet by codename in a multi sheet code

  1. #1
    Forum Contributor
    Join Date
    08-14-2012
    Location
    Derby, England
    MS-Off Ver
    Excel 2010
    Posts
    257

    Selecting sheet by codename in a multi sheet code

    Hi - I hope someone can help me with this I've been trying different methods but i'm struggling a little

    I'm trying to get a code to reference sheets by the codename - so in this case i want to start at Sheet18 and run the code through to Sheet37.

    This is my code:
    Please Login or Register  to view this content.
    What it is dong is starting from the 18th sheet in the workbook (which is not Sheet18) because of hidden sheets and others before it.

    I appreciate any help thanks
    John

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Selecting sheet by codename in a multi sheet code

    Simplest way...
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    08-14-2012
    Location
    Derby, England
    MS-Off Ver
    Excel 2010
    Posts
    257

    Re: Selecting sheet by codename in a multi sheet code

    Hi thanks for replying. I've added the code but its just running over on the same sheet. This is with my amendments:

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    08-14-2012
    Location
    Derby, England
    MS-Off Ver
    Excel 2010
    Posts
    257

    Re: Selecting sheet by codename in a multi sheet code

    Apologies - it does run through, it just doesn't do the:
    Please Login or Register  to view this content.
    bit on each sheet for some reason

  5. #5
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Selecting sheet by codename in a multi sheet code

    Sorry, can't comment. Your amended code works fine for me... Copies the format from Cell B1 on Sheet1 to the other sheets.

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

    Re: Selecting sheet by codename in a multi sheet code

    Replace this,
    Please Login or Register  to view this content.
    with this.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  7. #7
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Selecting sheet by codename in a multi sheet code

    Perhaps you need to qualify which sheet the range is to be selected on... As written, it'll select the cell son the current sheet.
    Please Login or Register  to view this content.
    to select those cells on the referenced sheet, ws.

    (I need to refresh the page before posting...)

  8. #8
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Selecting sheet by codename in a multi sheet code

    you can also use
    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  9. #9
    Forum Contributor
    Join Date
    08-14-2012
    Location
    Derby, England
    MS-Off Ver
    Excel 2010
    Posts
    257

    Re: Selecting sheet by codename in a multi sheet code

    I just added

    Please Login or Register  to view this content.

+ 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