VB Code exploded in size - suggestions

M

Marston

Hi - I've been working on some code for the past few weeks and after
adding a few lines of code and a couple of more userforms, my file has
grown from a few hundred K to over 11 Megs. Any suggestions on what to
look for in what might be growing the file?

I tried exporting all the userforms and modules and reimporting them
back into a new file, but it didn't have much of an impact on file
size (dropped a few hundred K)
 
T

Tom Ogilvy

go to each page and do Edit=>goto Special and select Last Cell.

does it go where you expected?

If it seems significantly bigger than expected, recognize the excel only
stores information on the rectangular range that if feels is in use. If you
have inadvertently expanded this range, then excel is storing much more
information than necessary. Go to each page and delete entirerows and
columns that are not being used

in the name box
200:65536 <cr>
delete
M:IV <cr>
delete

do the appropriate range on each sheet, then save the workbook.

Just one thing to look at.
 
M

Marston

From the workbook perspective, its a very clean file.
Only two sheets.
One is completely blank except that the cells that are
within the screen area are shaded - but not contents.
The other has two columns of data about 1500 rows long.
No named ranges, no charts, nothing else.
The only other thing in the entire workbook is my VB code.

Is it possible that my Userforms (I have 9 so far) could be
making things big?

The reason there isn't any data in the workbook is that the
workbook is basically a tool that processes lots of other files
that contain a lot of data. It opens those files, reads in the data,
manipulates it, writes it out to other workbooks.
 
Top