+ Reply to Thread
Results 1 to 2 of 2

Need help moving/ordering worksheets within a workbook

  1. #1
    Registered User
    Join Date
    09-25-2012
    Location
    San Antonio, Texas
    MS-Off Ver
    Excel 2003
    Posts
    21

    Need help moving/ordering worksheets within a workbook

    Howdy, all. I'm working on an excel file that can be used to input data each day over the course of a month. It has a different worksheet for each day, simply named in numerical order (1, 2, 3... 31). It's a work in progress, though, so I'm constantly tweaking the template and adding new features to it. Because of that, I was looking for a way to automatically copy a particular sheet several times and rename it. For instance, if it were the 13th, I'd update something on worksheet 14, and then run a macro to copy that worksheet 17 times and rename each of those copies (15, 16, 17... 31).

    Here's the code I have currently:

    Please Login or Register  to view this content.
    It successfully copies the active sheet the correct number of times and renames each one, but the issue I'm having is with the ordering of it. I'd like them to be in numerical order from 1 to 31, but it doesn't seem to turn out that way. I assume this has something to with the After:=Sheets(x) portion, though my VBA skills are awfully basic. Additionally, I made this macro by trial and error for the most part. If anybody has some feedback to improve and help me better understand some of what's going on here, I'd appreciate it.

  2. #2
    Forum Contributor
    Join Date
    07-27-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    198

    Re: Need help moving/ordering worksheets within a workbook

    To position copied worksheets at the end of existing sheets and in the same order that they are copied, try:
    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