Results 1 to 5 of 5

Thread: Selecting Excel tabs - without tab name

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2005
    Location
    Seattle
    Posts
    56

    Selecting Excel tabs - without tab name

    How can a macro select "all" tabs (or specific ones) without having to write in each tab name? My tab names might change, so I'd like to be able to select them all, or select sheets #2-6, 8, 11-21, etc., and print?

    Thanks much!

  2. #2
    Addicted Member
    Join Date
    Jan 2003
    Posts
    163

    Re: Selecting Excel tabs - without tab name

    worksheets can be refered to by index as well as by name

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Selecting Excel tabs - without tab name

    Moved to Office Development.

  4. #4
    Frenzied Member DKenny's Avatar
    Join Date
    Sep 2005
    Location
    on the good ship oblivion..
    Posts
    1,171

    Re: Selecting Excel tabs - without tab name

    VB Code:
    1. Sheets(Array(1,3,5,7,8)).Select
    2. ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
    Declan

    Don't forget to mark your Thread as resolved.
    Take a moment to rate posts that you think are helpful

  5. #5

    Thread Starter
    Member
    Join Date
    Mar 2005
    Location
    Seattle
    Posts
    56

    Re: Selecting Excel tabs - without tab name

    So simple! Thanks!

Posting Permissions

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



Click Here to Expand Forum to Full Width