+ Reply to Thread
Results 1 to 6 of 6

Return tab to original place in workbook

  1. #1
    Registered User
    Join Date
    01-09-2015
    Location
    NC
    MS-Off Ver
    2010
    Posts
    25

    Return tab to original place in workbook

    Hey all,

    Is it possible to command a tab to return to it's original location in a workbook?

    Thanks !

  2. #2
    Forum Contributor
    Join Date
    02-04-2014
    Location
    NSW, Australia
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Return tab to original place in workbook

    How did it move in the first place?
    You cant drag it back into position?
    Have you got some sort of coding that moves your tabs around?

    without knowing what is going on, can only suggest Left Click mouse on Tab name area Hold and Drag to place.

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Return tab to original place in workbook

    Hi,

    I just took a workbook with 5 tabs and recorded a macro to drag Tab 4 back to between tab 1 and 2. The VBA code looks like this:

    Sheets("Sheet4").Move Before:=Sheets(2)

    If you had the names of the tabs you could certainly write some code to get them back to the order you wanted them in.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    01-09-2015
    Location
    NC
    MS-Off Ver
    2010
    Posts
    25

    Re: Return tab to original place in workbook

    Sorry, I should have given more details...

    I have 150+ tabs in my workbook. Naturally, they are not named sheet 1, sheet 2, etc.

    I select the tabs that I think I might need & move them to the end. If I decide that I don't need them, I'd like to put them back in their original place.

    Thanks !

  5. #5
    Forum Contributor
    Join Date
    01-14-2014
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    240

    Re: Return tab to original place in workbook

    I think you'd either need to hold a key table of sheet name to required index or more preferably hold an index either in the tab name or sheet name so you can then run vba code to put the sheets back in the required or starting order.

    There is lots of code available on sorting sheets alphabetically for example you could use.

    I don't think you'll be able to achieve with out atleast some VBA.
    Please consider adding a * if I helped.

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Return tab to original place in workbook

    OK dgiardina

    Here is some VBA code that may do what you want. FIRST you need to find a cell in all your sheets that isn't being used. Some cell way out of the way like "AA3". Then change the code below (in both places) to "AA3".

    Change the code below and then run the subroutine TagSheetOrder (you will need to have all sheets in the correct order when you run this sub).

    After moving your sheets around manually and you want them back in the order you set using TagSheetOrder, you will run the second macro called ReorderSheets.

    See the attached for the example.

    Please Login or Register  to view this content.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 07-17-2014, 12:06 PM
  2. Saving workbook as notepad using cell data for filename & retaining original workbook name
    By peterkerr_13 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-26-2012, 08:07 AM
  3. Replies: 2
    Last Post: 11-24-2010, 06:52 AM
  4. [SOLVED] Return to Original Workbook
    By ajvasel in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-09-2006, 10:39 PM
  5. [SOLVED] HOW DO I SORT NAMED CELLS ? (the name stays in the original place)
    By Claude38 in forum Excel General
    Replies: 2
    Last Post: 08-13-2005, 08:59 PM

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