export and save data without leaving current workbook

adambensaid

New Member
Joined
Feb 22, 2011
Messages
5
Hello VBA crusaders,
I have a workbook with lots of calculations grouped by categories. I have a userform that directs users to initiate calculations in specific categories. Currently, the workbook parses the data and saves itself as a .xls. Instead, I would like to take just the sheets related to the chosen category and export and save them to a new .xls file without leaving the current workbook. At the end of all the analyses, the user would be able to save the "master sheet" but will also have a few saved spreadsheets representing reports from the different categories.
Thank you in advance for the help.
Adam

Excel 2007
Windows XP SP2
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Perhaps .SaveCopyAs might be the way to go. Check http://msdn.microsoft.com/en-us/library/bb178003(v=office.12).aspx.

(This saves the entire workbook so you may need to re-open the copy and delete sheets you don't want people to see.)

Thank you Ruddles. Unfortunately, your suggestion gives me a way to save a copy of the entire workbook, which defeats the purpose of having a category-specific report. If I don't find a better way, I may just have to let VBA open the saved books and remove the unneeded content, which would add significant processing time. :eeek:
Any more convenient suggestions?
 
Upvote 0
No, it's horrible but I couldn't think of any other way. Soz! :(
 
Upvote 0
All,
I still can't find a solution to this issue. I have to call on the collective wisdom of the VBA community for an answer.
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

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