+ Reply to Thread
Results 1 to 4 of 4

Increasing file size...

  1. #1
    Tony
    Guest

    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. #2
    Fredrik Wahlgren
    Guest

    Re: Increasing file size...


    "Tony" <[email protected]> wrote in message
    news:[email protected]...
    > 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. #3
    Norman Jones
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    >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. #4
    Jim Thomlinson
    Guest

    RE: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1