Memory Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi is there any way to get the memory used by code, so that I can write it to
a text file. I have checked out the history on this group but can't find
anything on this subject?.
TIA
Charles
 
Try this:

Sub ShowMemoryUsage()

Dim dMemUsed As Double

dMemUsed = Round(Application.MemoryUsed / 1000, 1)

MsgBox "Memory used: " & dMemUsed & " kB", ,"memory usage by Excel"

End Sub


RBS
 
Whilst these memory properties are available, I have seldom seen them have
much meaning apart from "a lot" or "not much".
Also, there is lot going on in the background of Excel, that you can't
control, so it's debatable how accurate they would be at any specific
instant.

NickHK
 

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