Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Dec 2004
    Location
    Cypress, California, USA
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Go from A to B (97)

    I've written an Excel application with a set of macros for reporting various views of 1 month's worth of data. Unfortunately the main file is growing (as expected) and getting too big to practically email every month. I want to have the monthly data extracted & formatted "outside" of the main data workbook. How can I do the following:

    Copy 1 specific sheet ("Raw_Data") from Workbook A into new Workbook B (named "Data Views for MMM-YYYY").
    Copy certain specific macros from Workbook A into new Workbook B.
    Open Workbook B and run the macros just added to it (these create many new worksheets based on the Raw_Data worksheet).
    Close & save all Workbooks.

    Any help is appreciated.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Go from A to B (97)

    Do you really need the macros to be copied to the new workbook, or would it be sufficient to run them from the original workbook (affecting the new workbook)?

  3. #3
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Go from A to B (97)

    If he is going to email the copied workbook, he probably needs the macros in that workbook. I would put those macros in a template or workbook that could be used to copy the data to. Would that be acceptable to the Original Poster?
    Legare Coleman

  4. #4
    New Lounger
    Join Date
    Dec 2004
    Location
    Cypress, California, USA
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Go from A to B (97)

    The macros do not actually need to be in the final book. Is there a way to run macros in Workbook A against data in Workbook B ?

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Go from A to B (97)

    Yes, you can operate on any open workbook. In general, code will affect the currently active workbook unless you explicitly specify another workbook. So if you make the new Workbook B the active workbook, macros stored in Workbook A will modify Workbook B.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •