Excel Worksheet Increases Size when running the macro

bhuvana

New Member
Joined
Sep 18, 2009
Messages
9
Hello,

I m having an Excel Worksheet that has 5 macros. When i wrote the macro and saved it, the size of the Worksheet was just 16.91 Kb but once i run the macro it increases its size to 14.35 MB. Can you please tell me what is reason behind the sudden increase in the size of the Excel Worksheet, and how to reduce the space.

I do have the Vlookup and formulae written in the same worksheet. And also I'm using a Xml post that posts the data to the net.

Waiting for your reply
Thank you
Bhuvana
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
What is the code doing? Can you post the code? Also what is the vlookup formula you are using and is the macro insertign that formula into the workbook?

I assume you have some inefficiencies in the code that maybe are populating too many cells or causing Excel to think these cells are being used. Also the vlookup can make the size go up when it holds that data in memory when it is closed.
 
Upvote 0
Thank you schielrn,

As you told its all because of the inefficiency in the code. I checked my code and found that have taken all the cells and formatted with border, hence it increased its size after running the macro. So now i changed the code and have formatted only the required cells which is just 2 kb increase (which is very fine).

Regards
Bhuvana
 
Upvote 0

Forum statistics

Threads
1,215,062
Messages
6,122,923
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top