如何读取Excel 2016 VBA中已使用或可用的内存量 [英] how to read the amount of used or free memory in Excel 2016 VBA
本文介绍了如何读取Excel 2016 VBA中已使用或可用的内存量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我似乎找不到找到返回正在使用的内存或可用内存的VBA命令. 在Excel 2013中有Application.MemoryUsed,但是当我在Excel 2016中尝试时,无论是否使用,我都会得到类型不匹配"
I can't seem to find a VBA command that returns the memory in use or the memory available. In Excel 2013 there was Application.MemoryUsed but when I try that in Excel 2016 I get "Type mismatch", regardless if I use
dim myVar as variant
myvar = Application.MemoryUsed
或
MsgBox CStr(Application.MemoryUsed)
这可能很简单.还是?
推荐答案
提出问题后不久,我就找到了答案.
I found the answer shortly after I put the question.
查看全文