Exporting selected worksheets to a new file

electronicsgeek

New Member
Joined
Apr 3, 2002
Messages
28
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.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
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
 
Upvote 0
If you don't already have the email code then do a search on this board, this topic is well documented.
 
Upvote 0

Forum statistics

Threads
1,213,521
Messages
6,114,109
Members
448,548
Latest member
harryls

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top