Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default Memory Question

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Memory Question

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


"vqthomf" wrote in message
...
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Memory Question

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

"RB Smissaert" wrote in message
...
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


"vqthomf" wrote in message
...
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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
XL 2007 - Out of Memory - memory leak/bug? PCLIVE Excel Discussion (Misc queries) 0 March 23rd 09 03:31 PM
VBA memory Jeff Excel Discussion (Misc queries) 1 September 14th 06 05:51 PM
Out of memory? JENNYC Excel Discussion (Misc queries) 1 November 28th 05 10:58 PM
Question about releasing memory TBA[_2_] Excel Programming 2 January 20th 04 04:24 AM
The instruction at "0x65255ac9" referenced memory at "0x00000008". The memory could not be read. Clikc OK to terminate etc Angus Comber[_2_] Excel Programming 1 November 7th 03 01:18 PM


All times are GMT +1. The time now is 08:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"