+ Reply to Thread
Results 1 to 3 of 3

VBA to create new workbook with 2 sheets of exsisting workbook

  1. #1
    Forum Contributor
    Join Date
    01-18-2013
    Location
    Prague
    MS-Off Ver
    Excel 2013
    Posts
    159

    VBA to create new workbook with 2 sheets of exsisting workbook

    Hi all,

    I need help with the code below.

    In the Workbook "Sample file", in sheet "Order" I have a complicated. This calculation , based on the selected/filled values in the yellow cells, it takes data from the sheets named with numbers (1,2,3,4,5,6,7,8,9, 11 (2)) and calculate the price of the chosen products.

    In the sheet "Order Document-template" is summarized version of the calculation.

    When I click the "Generate order" button in "Order" sheet, the macro creates new workbook with the "Order Document-template" sheet (with values only, hard copying the formulas), and renames the sheet to "Order Document".
    If a values in column G in sheet "Order Document" is equal to 0, the rod is deleted.

    Until now, the code works file.

    I need also in the newly created document, aside "Order Document" sheet to be inserted another sheet ("Order inputs") in which will be the values and formatting in range "A1:F20" of sheet "Order".

    I've attached 3 documents.
    1. "Sample file" is the working document.
    2. "How generated file looks" is the current look of the generated document.
    3. "How generated file SHOULD look" is the sample file which shows how the generated document should look.

    If the above is not clear enough, please let me know and I'll try to further explain the details.

    Thank you in advance for your help.

    Igor


    Please Login or Register  to view this content.
    How generated file looks.xlsb
    How generated file SHOULD look.xlsb
    Sample file.xlsb

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,616

    Re: VBA to create new workbook with 2 sheets of exsisting workbook

    Hi Igor,

    Try:
    Please Login or Register  to view this content.
    Best Regards,

    Kaper

  3. #3
    Forum Contributor
    Join Date
    01-18-2013
    Location
    Prague
    MS-Off Ver
    Excel 2013
    Posts
    159

    Re: VBA to create new workbook with 2 sheets of exsisting workbook

    Hi Kaper,

    That's perfect!!! I've just made little adjustment at the end of your code, but it works perfectly. Thank you a lot!!!.

    Igor

    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)

Similar Threads

  1. [SOLVED] Macro to copy sheets from workbook and create new workbook
    By sudric in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-18-2015, 11:53 AM
  2. [SOLVED] Delete sheets and create a new workbook in Shared Workbook.
    By honger in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-02-2014, 01:35 PM
  3. Need help with an exsisting formula that will not work for me in a workbook
    By rvjourneyon in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 06-21-2012, 02:54 PM
  4. Automatically Copy sheets in one workbook to create sheets in a new workbook..
    By leebarratt in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-13-2011, 03:14 AM
  5. Create multiple sheets in new workbook based on credentials in source workbook
    By Julesdude in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-07-2011, 10:31 AM
  6. Replies: 3
    Last Post: 06-14-2007, 08:26 AM
  7. Replies: 4
    Last Post: 08-17-2006, 01:30 AM

Tags for this Thread

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