+ Reply to Thread
Results 1 to 4 of 4

Macro to move one sheet to another book and create a new sheet in the original book

  1. #1
    Registered User
    Join Date
    07-22-2008
    Location
    ctown
    Posts
    35

    Macro to move one sheet to another book and create a new sheet in the original book

    I have an invoice sheet and when all pertinent information is entered into it I would like a new invoice sheet with the same format to be created in that workbook. At the same time the previous(finished) invoice should be deleted from the workbook and filed away into another workbook specifically for old invoices. Any ideas would be of great help. Attached is the invoice for further clarification.
    Attached Files Attached Files

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello jrcream,

    The attached workbook contains the following macros. Clicking on the "Save Invoice" button will save the current invoice to the workbook for old invoices, Each saved sheet is named "Invoice " and the invoice number. You should change the folder path and file name to what you want to use.

    If the folder doesn't exist then the macro will create it. The invoice number is stored locally on your computer and not on the worksheet. This is more secure and prevents the users from easily altering the invoice number. If no invoice number has been assigned, you will be prompted to enter one.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross
    Attached Files Attached Files
    Last edited by Leith Ross; 08-01-2008 at 05:46 AM.

  3. #3
    Registered User
    Join Date
    07-22-2008
    Location
    ctown
    Posts
    35

    update

    to build upon this idea now I want to be able to open the old invoices to update them and have their changes saved without creating a new invoice. Also I'd like certain cells to be archived(the date of event and pickup) into another worksheet based on the invoice #.

  4. #4
    Registered User
    Join Date
    07-22-2008
    Location
    ctown
    Posts
    35
    to clarify the above statement:

    The code written by Leith only allows one invoice to be saved and if a new invoice is saved it overwrites the previous invoice. I am trying to alter and revise the code to allow an infinite amount of invoices to be saved as well as allowing invoices to be altered and saved. When they are saved the referenced cells in the invoice used in another worksheet should also be updated based upon the invoice #. If anyone can help it will be greatly appreciated.

+ 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