ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How much memory does VBA code occupy? (https://www.excelbanter.com/excel-programming/366931-how-much-memory-does-vba-code-occupy.html)

Ozgur Pars[_2_]

How much memory does VBA code occupy?
 
Hi,
I know its probably a dumb question but I have a file in which I copy data
from another workbook through named ranges. Its a fairly big amount of data
so when copied the file is aroun 2.5 MB but when I delete all the data the
workbook is still 1.1 MB... does simple code take that much of space.

Thanks,
Oz

Norman Jones

How much memory does VBA code occupy?
 
Hi Oz,

After deleting the data did you reset the used range?

See Debra Dalgleish's suggestions at:

http://www.contextures.com/xlfaqApp.html#Unused


As an independent check, try copying the code module(s) into a new workbook,
save the workbook and look at its size,



---
Regards,
Norman


"Ozgur Pars" wrote in message
...
Hi,
I know its probably a dumb question but I have a file in which I copy data
from another workbook through named ranges. Its a fairly big amount of
data
so when copied the file is aroun 2.5 MB but when I delete all the data the
workbook is still 1.1 MB... does simple code take that much of space.

Thanks,
Oz




Norman Jones

How much memory does VBA code occupy?
 
Hi Oz,

You may also wish to 'spring clean' your code using Rob Bovey's
indispensable Code Cleaner addin, which may be downloaded, free of charge
at:

http://www.appspro.com/Utilities/Utilities.htm


---
Regards,
Norman



"Ozgur Pars" wrote in message
...
Hi,
I know its probably a dumb question but I have a file in which I copy data
from another workbook through named ranges. Its a fairly big amount of
data
so when copied the file is aroun 2.5 MB but when I delete all the data the
workbook is still 1.1 MB... does simple code take that much of space.

Thanks,
Oz




Ozgur Pars[_2_]

How much memory does VBA code occupy?
 
Hi Norman,
I checked out the site and got the reset used range code... it reduced the
empty workbook to 230 kbyte and the one with data to 1.87 MB...

Thank you a lot for your help!

Ozgur

"Norman Jones" wrote:

Hi Oz,

After deleting the data did you reset the used range?

See Debra Dalgleish's suggestions at:

http://www.contextures.com/xlfaqApp.html#Unused


As an independent check, try copying the code module(s) into a new workbook,
save the workbook and look at its size,



---
Regards,
Norman


"Ozgur Pars" wrote in message
...
Hi,
I know its probably a dumb question but I have a file in which I copy data
from another workbook through named ranges. Its a fairly big amount of
data
so when copied the file is aroun 2.5 MB but when I delete all the data the
workbook is still 1.1 MB... does simple code take that much of space.

Thanks,
Oz





Norman Jones

How much memory does VBA code occupy?
 
Hi Oz,

Thank you a lot for your help!


I should have added in my reply that an essential site for matters related
to memory is Charles Williams DecisionModels site:

http://www.decisionmodels.com/optspeedd.htm


---
Regards,
Norman



raypayette[_10_]

How much memory does VBA code occupy?
 

Deleting data still retains information such as formatting. It is bette
to use Edit, Clear, All

--
raypayett

-----------------------------------------------------------------------
raypayette's Profile: http://www.excelforum.com/member.php...fo&userid=2956
View this thread: http://www.excelforum.com/showthread.php?threadid=56058


Norman Jones

How much memory does VBA code occupy?
 
Hi Ray,

Deleting data still retains information such as formatting. It is better
to use Edit, Clear, All.


Using Edit , Clear All may not reset the used range.

In this connection, you will note that Oz reporrted favourable results after
using techniques suggested by Debra Dalgleish to reset the used range.


---
Regards,
Norman




All times are GMT +1. The time now is 12:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com