使用VBA清除立即窗口? [英] Use VBA to Clear Immediate Window?

查看:950
本文介绍了使用VBA清除立即窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人知道如何使用VBA清除立即窗口?



虽然我可以自动手动清除它,但我很好奇,如果有办法做到这一点

解决方案

以下是 here

  Sub stance()
Dim x As Long

对于x = 1到10
Debug.Print x
下一个

调试。现在打印
Application.SendKeys^ g ^ a {DEL}
End Sub


Does anyone know how to clear the immediate window using VBA?

While I can always clear it myself manually, I am curious if there is a way to do this programmatically.

解决方案

Below is a solution from here

Sub stance()
Dim x As Long

For x = 1 To 10    
    Debug.Print x
Next

Debug.Print Now
Application.SendKeys "^g ^a {DEL}"    
End Sub

这篇关于使用VBA清除立即窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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