ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Links and Linking in Excel (https://www.excelbanter.com/links-linking-excel/)
-   -   Monitor memory usage (https://www.excelbanter.com/links-linking-excel/26033-monitor-memory-usage.html)

JL

Monitor memory usage
 
Is it possible to monitor memory usage via vba? Basically,
when a certain percentage of memory is reached I would
like to show a message box asking the user to close some
applications.

Thank you


Nick Hodge

JL

There are three properties you could use, MemoryUsed, MemoryFree,
TotalMemory. Like so

Sub memory()
With Application
MsgBox "Total memory used: " & .MemoryUsed
MsgBox "Total memory free: " & .MemoryFree
MsgBox "Total memory: " & .MemoryTotal
End With
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"JL" wrote in message
...
Is it possible to monitor memory usage via vba? Basically,
when a certain percentage of memory is reached I would
like to show a message box asking the user to close some
applications.

Thank you





All times are GMT +1. The time now is 01:57 AM.

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