+ Reply to Thread
Results 1 to 9 of 9

File size after runnign macro

  1. #1
    Registered User
    Join Date
    09-15-2006
    Posts
    9

    File size after runnign macro

    All,

    I have a series of macros that format an excel spreadsheet and produces a overview page of the results. Nothing too fancy at all.

    However when the macro runs the file size grows from 500 kb to around 7Mb.

    Has anyone else seen this and how did you overcome it

    thanks

    Richard

  2. #2
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    I had something similar quite a while ago but it was on a network drive, some unkind folk had made local copies of my workbook (but didnt break any links created) so when my code ran to gather in formation it tried to make copies for all other workbooks...............i found the culprits pulled their arms outta their sockets and beat them with the sticky ends then all seemed fine!

    Give it a go it's a satisfying feeling! haha!

    seriously i would look for links to other worksheets or books or maybe in your code you are calling a procedure that has a call for a procedure that calls back to it...........if that made sense!

    Regards,
    Simon

  3. #3
    Forum Contributor colofnature's Avatar
    Join Date
    05-11-2006
    Location
    -
    MS-Off Ver
    -
    Posts
    301
    Another possibility is that your macro is using a cell way down or across a worksheet. Even if you then clear the contents, Excel "remembers" that the cell has been used. So, even if you only have data in A1, if you've evr had anything in, for example, Z50000, Excel saves 1300000 cells! To find out, go to each tab in turn and press Ctrl+End - this teleports you straight to the last cell on that sheet - then delete any rows and/or columns which don't have any data in them.

    Col
    If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime.

  4. #4
    Registered User
    Join Date
    09-15-2006
    Posts
    9
    Thanks alot will have a look.

  5. #5
    Registered User
    Join Date
    09-15-2006
    Posts
    9
    Sadly but neither of these were the case.

    Any other ideas anyone?

  6. #6
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    I could be clutching at straws but try turning off Track Changed in Tools Options.

    regards,
    Simon....

    You could mail the workbook to me if you wish and i will have a look, if you would like mail to SimonwlloydATmsnDOTcom

  7. #7
    Registered User
    Join Date
    09-15-2006
    Posts
    9
    Sadly but neither of these were the case.

    Any other ideas anyone?

  8. #8
    Forum Contributor
    Join Date
    11-11-2005
    Posts
    267
    As a palliative, try a code cleaner. Rob Bovey's is a good one.
    HTH
    Myles

    ...constantly looking for the smoother pebble while the whole ocean of truth lies before me.

  9. #9
    Registered User
    Join Date
    09-15-2006
    Posts
    9
    Simon your a genius!

    Cheers a million for all of your help.

    My worksheet is now perfect!

    File size reduced from 18mb to less than a mb.

    thanks again for all your help Simon and just hope can be of assistance to you one day

+ 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