Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 17th, 2004, 09:27 AM
Authorized User
 
Join Date: Aug 2003
Posts: 24
Thanks: 0
Thanked 1 Time in 1 Post
Default Output Size

I have a VBA template (Little Less than 1 MB) . Template contains a worksheet (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

Ajitpal S Padda
__________________
Ajitpal S Padda
 
Old March 17th, 2004, 02:23 PM
Authorized User
 
Join Date: Feb 2004
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I solve this problem by writing the code to produce a new workbook with the only the necessary information. I don't use templates (personal preference), but the concept should work. Either have a basic sheet in your source workbook that you copy (worksheets("Source").copy) to create the new workbook, or create a new workbook (workbooks.add) and then use a range copy to put down the information that the User needs.

Dave
 
Old April 3rd, 2004, 06:42 PM
Authorized User
 
Join Date: Mar 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

another tip is that make sure you only copy the area that contains data, don't go copying a whole sheet, as you may find that you are copying a range bigger that needed ( blank formatted cells ) these all add up.
Copy and paste special values only the data needed, and this should reduce the size.







Similar Threads
Thread Thread Starter Forum Replies Last Post
SqlDbType.Xml Output Parameter needs a size - Why? francislang ADO.NET 1 January 28th, 2008 08:28 PM
Size of text box depending on size of another box AstridVM BOOK: Access 2003 VBA Programmer's Reference 0 March 7th, 2007 06:24 AM
Switchboard Size ru1 Access 1 April 18th, 2006 11:31 AM
Size of Screen cinest General .NET 2 October 8th, 2004 03:33 AM
Screen Size bmains VB.NET 11 June 28th, 2004 02:41 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.