Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 313
Default Increasing file size...

I created a macro that is used to update/add information to another separate
file. This saved file was getting to be rather large so I opened a new
workbook and copy/pasted each sheet into the new file. This reduced the size
by quite a bit, but once I ran the macro on this file again it jumped from
about 6.5M to 17.5M. Is there a way that I can prevent this? Maybe some kind
of code I can put into the macro that will get rid of what ever it is that is
increasing the file size? Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 339
Default Increasing file size...


"Tony" wrote in message
...
I created a macro that is used to update/add information to another

separate
file. This saved file was getting to be rather large so I opened a new
workbook and copy/pasted each sheet into the new file. This reduced the

size
by quite a bit, but once I ran the macro on this file again it jumped from
about 6.5M to 17.5M. Is there a way that I can prevent this? Maybe some

kind
of code I can put into the macro that will get rid of what ever it is that

is
increasing the file size? Thank you.


http://archive.baarns.com/excel/develop/vbaperfm.asp


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Increasing file size...

Hi Tony,

See Debra Dalgeish's notes at:

http://www.contextures.com/xlfaqApp.html#Unused

However, I would be more interested in amending the code to pre-empt the
file bloat.

Without any code it is difficult to comment further.

---
Regards,
Norman



"Tony" wrote in message
...
I created a macro that is used to update/add information to another
separate
file. This saved file was getting to be rather large so I opened a new
workbook and copy/pasted each sheet into the new file. This reduced the
size
by quite a bit, but once I ran the macro on this file again it jumped from
about 6.5M to 17.5M. Is there a way that I can prevent this? Maybe some
kind
of code I can put into the macro that will get rid of what ever it is that
is
increasing the file size? Thank you.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Increasing file size...

The best plan of acction is to not increase the file size to begin with. If
you take a look at the sheets the right hand scroll bar on one or all of the
sheets will allow you to scroll all the way down to row 65,535 (my best guess
at what is going on). Somehow your code is doing something to initialize all
fo these cells. They will be blank but they will have been initialized and
stored in memory. To clean this up just delete (not clear the contents) of
these empty cells and resave the file. The size should go down substantially.
If this is the case then find the code that causes these cell to become
initailized. One thing to look for would be code that reference row 65,535...
The offending line or lines of code will also take longer to execute (a
second or two) ...

HTH

"Tony" wrote:

I created a macro that is used to update/add information to another separate
file. This saved file was getting to be rather large so I opened a new
workbook and copy/pasted each sheet into the new file. This reduced the size
by quite a bit, but once I ran the macro on this file again it jumped from
about 6.5M to 17.5M. Is there a way that I can prevent this? Maybe some kind
of code I can put into the macro that will get rid of what ever it is that is
increasing the file size? Thank you.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Increasing file size JTS1974 Excel Discussion (Misc queries) 1 March 25th 09 04:21 PM
Increasing comment box size? jmumel Excel Discussion (Misc queries) 1 October 12th 07 07:17 PM
Size of my comments keeps increasing ram Excel Discussion (Misc queries) 0 March 29th 06 08:58 PM
increasing spreadsheet size Slide Hambidge via OfficeKB.com Excel Discussion (Misc queries) 6 July 18th 05 03:07 PM
File size is increasing Haldun Alay[_2_] Excel Programming 1 September 30th 03 03:27 AM


All times are GMT +1. The time now is 01:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"