如何读取Excel 2016 VBA中已使用或可用的内存量 [英] how to read the amount of used or free memory in Excel 2016 VBA

查看:390
本文介绍了如何读取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.

在这里找到:

感谢Anonimista!

Thanks to Anonimista!

这篇关于如何读取Excel 2016 VBA中已使用或可用的内存量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆