Template Size

G

Guest

I have a VBA template (Little Less than 1 MB) . Template contains a worsheet (1) which contains data and i have couple of forms with listboxes etc which pick the data from the worksheet (1) and depending upon the selections made on forms output is created on worksheet (2) . Now my problem is that when output is created the size of my xls is same (little less that 1 mb) where as now i dont need that data in worksheet (1) and all the forms and macros/code etc. Could someone suggest a way to cut down the size of my worksheet with output.

Suggestions will be appreciated
 
D

Dick Kusleika

AJ

If you just want to save the output sheet, the best thing to do would be to
copy it to a new workbook.

Sheet2.Copy 'no argument means iy will create a new workbook

'then save the new workbook
ActiveWorkbook.SaveAs "Filename.xls"

'then close the file with the macros and other sheets without saving
ThisWorkbook.Close False


--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.


AJ said:
I have a VBA template (Little Less than 1 MB) . Template contains a
worsheet (1) which contains data and i have couple of forms with listboxes
etc which pick the data from the worksheet (1) and depending upon the
selections made on forms output is created on worksheet (2) . Now my problem
is that when output is created the size of my xls is same (little less that
1 mb) where as now i dont need that data in worksheet (1) and all the forms
and macros/code etc. Could someone suggest a way to cut down the size of my
worksheet with output.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top