+ Reply to Thread
Results 1 to 2 of 2

Copy and move worksheets using current VBA code

  1. #1
    Registered User
    Join Date
    03-11-2020
    Location
    WV, US
    MS-Off Ver
    Office 365
    Posts
    3

    Copy and move worksheets using current VBA code

    I have a worksheet called "Control Plan" with 3 pages of information. The code below (I didn't create but have manipulated it over the years) copies the contents of the second page and relocates it to the next empty row from the bottom. Then it pastes the copied data to create a new page. The contents are cleared from a specific range for new data entry. The process is repeated as new sheets are added.

    What I need to happen is for page 3 to always be moved and be the last page of the worksheet before the code runs, regardless of how ever many times the user adds pages. The document grows dynamically when the user clicks on the "Add a Checklist" button on page 2, which now becomes page 3 and so on. The contents on the current page 3 must be moved and always be the new last page every time.

    I'm sure this can be done, but I don't know where in the current code to insert new code that will make it happen, without messing up the program.

    Please Login or Register  to view this content.
    Last edited by Pepe Le Mokko; 03-12-2020 at 03:14 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: Copy and move worksheets using current VBA code

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    I did it for you this time. Please read forum rules. Thanks

+ 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. [SOLVED] VBA code to create a workbook and copy or move worksheets in to workbook through loop
    By anishkumarvs in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-16-2015, 05:40 AM
  2. copy names of worksheets in current worksheet
    By rmb623 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-01-2014, 07:08 PM
  3. Replies: 2
    Last Post: 05-20-2014, 11:26 PM
  4. [SOLVED] Code that finds and deletes names from current sheet to all worksheets in workbook
    By grazian2 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-01-2013, 11:51 AM
  5. Replies: 2
    Last Post: 07-31-2013, 03:21 PM
  6. VBA code to copy data from specific worksheets from current workbook to a new one
    By Uday2013 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-01-2013, 12:15 PM
  7. [SOLVED] Move/Copy worksheets (possibly) using vlookups
    By daniel_t in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-09-2013, 11:56 AM

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