View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
R Avery[_2_] R Avery[_2_] is offline
external usenet poster
 
Posts: 44
Default Determine memory usage of objects (like Dictionary)

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!