Exporting selected worksheets to a new file
Manage your personal finances in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: Exporting selected worksheets to a new file

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    28
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Hello all:
    I'm working on a tool which contains sensitive information. What I am attempting is allowing selections on a "configuration page" that drive different calculations within the workbook and have the results either first out put to a "Results" worksheet then be able to hit a button to export the "Results" worksheet to a different file which could then be e-mailed. Either this or after configuration, the results would be exported directly to a different workbook or better yet a Word Doc. I know this is on the wishful side but was wondering if anyone had any idea to get this to work.

    Thanks.

  2. #2
    MrExcel MVP Jay Petrulis's Avatar
    Join Date
    Mar 2002
    Location
    Chicago, IL USA
    Posts
    2,040
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-04 09:05, electronicsgeek wrote:
    Hello all:
    I'm working on a tool which contains sensitive information. What I am attempting is allowing selections on a "configuration page" that drive different calculations within the workbook and have the results either first out put to a "Results" worksheet then be able to hit a button to export the "Results" worksheet to a different file which could then be e-mailed. Either this or after configuration, the results would be exported directly to a different workbook or better yet a Word Doc. I know this is on the wishful side but was wondering if anyone had any idea to get this to work.

    Thanks.
    Hi,

    Make sure you are copying the values/formats, etc. to the "Results" sheet and *NOT* any formulae.

    In your code, use the following

    Sheets("Results").Copy

    This makes a new workbook with the results sheet as the only sheet.

    When you copy the sheet, the new file becomes the active workbook, so you can use

    ActiveWorkbook.SaveAs
    and
    ActiveWorkbook.SendMail (or whatever e-mailing process you've coded)

    You can doo all of this in VBA, so please post back if you need more help.

    Thanks,
    Jay

  3. #3
    MrExcel MVP Al Chara's Avatar
    Join Date
    Feb 2002
    Location
    Newark, Delaware
    Posts
    1,701
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    If you don't already have the email code then do a search on this board, this topic is well documented.
    Best regards,
    Allan Chara
    http://www.mrspreadsheets.com

  4. #4
    New Member
    Join Date
    Apr 2002
    Posts
    28
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Thanks Jay, it works.

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com