Slow saving when adding VBA forms

S

staeri

I have a Excel 2003 workbook (0,6 Mb) with 9 simple sheets and 4 hidden
sheets. I also have VBA forms with code. Saving this file takes 10
seconds which is way too long.

If I create a new workbook and copy the sheets into the new workbook
the time for saving is ok. As soon as I also copy the VBA forms the
saving time increases to 10 seconds.

I run this workbook on a Pentium 2.0 Ghz processor with 1 Gb RAM, Excel
2003 and Windows XP. A friend of mine has tested the same workbook on a
computer with Windows 98 SE, Office 2000 and the time for saving is
less than 1 second.

How can this be possible? Is there any solution? Has anyone else
experienced this?

Regards,

SE
 
G

galimi

The size is likely due to one of the sheets being oversized. In the
immediate window of your IDE type the following:

for each oSht in thisworkbook.sheets: ?oSht.usedrange.count: next

This will tell you the number of cells in each sheet that Excel thinks it
should be saving. You can trim a large sheet by highlighting excess
rows/columns and deleting them.
 
S

staeri

Thank you for the help. I've trimmed the sheet but the problem is still
there. It takes 10 seconds to save the workbook. Without the VBA forms
it takes a few seconds which is ok.

Does anyone else have any suggestions?

Regards,

S


galimi skrev:
 

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