Determine memory usage of objects (like Dictionary)

  • Thread starter Thread starter R Avery
  • Start date Start date
R

R Avery

I want to write a VBA procedure to determine the size (in RAM) of an
object, e.g., a Scripting.Dictionary. Is there anyway to do this?

If there is no direct way, perhaps it is possible to run some simple
diagnostics like check how much memory VBA has allocated, dim a new
dictionary, check memory allocation again, add 1000 items, check
allocation again... just to get a sense of how much overhead is
involved with the object. Can this be done?

ANy help would be appreciated!
 
You can use the following properties to determine memory usage before and
after your call to the scripting dictionary

application.memoryfree
application.memorytotal
application.memoryused
 

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

Back
Top