+ Reply to Thread
Results 1 to 6 of 6

Generating a macro output in a seperate workbook

  1. #1
    Forum Contributor
    Join Date
    10-08-2013
    Location
    Chennai, INDIA
    MS-Off Ver
    Excel 2010
    Posts
    157

    Question Generating a macro output in a seperate workbook

    Hi All,

    I have worked a simple macro that manupulates numbers in a range example: A1:H60....
    and saved in as template...

    after i run the macro in template it should export the output ie: ranges A1:H60 in a new workbook, that i can save seperately...

    Thanks...
    Bala

  2. #2
    Forum Contributor
    Join Date
    09-30-2013
    Location
    Toronto, ON
    MS-Off Ver
    Excel 2007
    Posts
    229

    Re: Generating a macro output in a seperate workbook

    Would saving the active sheet with a new name address the requirement?
    Please Login or Register  to view this content.

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

    Re: Generating a macro output in a seperate workbook

    Hello bmbalamurali,

    This should work for you. I will copy the range A1:H60 of the active sheet, create a new workbook with a single sheet, and paste the contents into it.

    Add a new VBA Module to your workbook and paste the macro in it. Change the range if needed.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Forum Contributor
    Join Date
    10-08-2013
    Location
    Chennai, INDIA
    MS-Off Ver
    Excel 2010
    Posts
    157

    Question Re: Generating a macro output in a seperate workbook

    Hi Hectop, Thanks....

    Hi Leith Ross,

    Thanks....

    I tried your code and its genarating a new workbook but with empty cells and showing a debug error... in below code...

    Please Login or Register  to view this content.
    and also tell me whether i can change the range from A1 to any cell range ie: H60, H61, H62 etc....

    I have attached an excel.. which has a macro to organise a date from sheet1 to sheet2.... after organising data i need my desired range to be populated in a new workbook...
    I have created the macro of my excel with help of forum guru (HaHoBe)......

    where in sheet 2 my output range starts from B2 to H60 this is because the sample size i have mentioned in the excel so based on the sample size my range may vary from B1 to H60,H61,H62...etc....

    Kindly come back if am not clear, request your support in accomplishing my need...

    Kindly look into it.. and provide me a solution... Thanks...
    Attached Files Attached Files
    Last edited by bmbalamurali; 10-27-2013 at 05:15 AM. Reason: correction

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    2013 on Win10 (desktop), 2007 on Win10 (notebook)
    Posts
    8,082

    Re: Generating a macro output in a seperate workbook

    Hi, bmbalamurali,

    please check the codename of the sheet in the new workbook - it might not be Sheet1 in the version you use (for me using a German Version it´s Tabelle1):
    Please Login or Register  to view this content.
    As the new workbook is active when being added you may use
    Please Login or Register  to view this content.
    instead if you won´t use WKB thereafter.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  6. #6
    Forum Contributor
    Join Date
    10-08-2013
    Location
    Chennai, INDIA
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Generating a macro output in a seperate workbook

    Hi HaHoBe,

    Thanks working fine... and i also incorporated it in my macro and working great...

    Schönen Dank
    Last edited by bmbalamurali; 10-27-2013 at 11:01 AM. Reason: correction

+ 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. Emailing workbook which is already a macro output !
    By amlan009 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-01-2012, 11:01 AM
  2. Generating output to a column for many ranges
    By Rynofasho in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-09-2010, 03:08 PM
  3. Macro that will seperate a workbook into smaller ones
    By alogoc in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-10-2009, 04:57 AM
  4. Run different filters on data and output each to a seperate workbook
    By jvegastn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-12-2009, 03:55 PM
  5. Replies: 1
    Last Post: 03-22-2006, 11:50 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