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

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
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. :eek:
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,214,918
Messages
6,122,241
Members
449,075
Latest member
staticfluids

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