Sheet codename order in VBE
Results 1 to 6 of 6

Thread: Sheet codename order in VBE
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular Dr. Demento's Avatar
    Join Date
    Nov 2010
    Location
    Skipping stones off Charon's Ferry
    Posts
    541
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Sheet codename order in VBE

    I have a large number of worksheets (>200) and because Excel places the sheets in order of codename and because the codenames are alphanumeric, I wind up with an order like Sheet1, Sheet100, Sheet101, etc.

    Is there a way re-order the sheets so they are in either the same order as the tabs or at least numerically ordered??

    Thanks y'all.

  2. #2
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    25,311
    Post Thanks / Like
    Mentioned
    435 Post(s)
    Tagged
    45 Thread(s)

    Default Re: Sheet codename order in VBE

    AFAIK the only way would be to change the codenames
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  3. #3
    MrExcel MVP mikerickson's Avatar
    Join Date
    Jan 2007
    Location
    Davis CA
    Posts
    22,454
    Post Thanks / Like
    Mentioned
    20 Post(s)
    Tagged
    14 Thread(s)

    Default Re: Sheet codename order in VBE

    I'm not sure what you mean by Excel ordering sheets in order of creation.

    This returns the sheet's codenames in the tab order (left-most first)
    Code:
    Dim oneSheet As Worksheet
    
    For Each oneSheet In ThisWorkbook.Sheets
        MsgBox oneSheet.CodeName
    Next oneSheet

  4. #4
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    25,311
    Post Thanks / Like
    Mentioned
    435 Post(s)
    Tagged
    45 Thread(s)

    Default Re: Sheet codename order in VBE

    I think that the OP is talking about the order of the sheets as seen in the Project window.
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  5. #5
    Board Regular Dr. Demento's Avatar
    Join Date
    Nov 2010
    Location
    Skipping stones off Charon's Ferry
    Posts
    541
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Sheet codename order in VBE

    Fluff is correct; I was looking at the VBE Projects window.

    Appreciate the feedback.

  6. #6
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    25,311
    Post Thanks / Like
    Mentioned
    435 Post(s)
    Tagged
    45 Thread(s)

    Default Re: Sheet codename order in VBE

    You're welcome & thanks for the feedback
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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