Use VBA to Clear Immediate Window?

前端 未结 16 1428
刺人心
刺人心 2021-01-30 00:19

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.

16条回答
  •  梦谈多话
    2021-01-30 00:34

    I had the same problem. Here is how I resolved the issue with help from the Microsoft link: https://msdn.microsoft.com/en-us/library/office/gg278655.aspx

    Sub clearOutputWindow()
      Application.SendKeys "^g ^a"
      Application.SendKeys "^g ^x"
    End Sub
    

提交回复
热议问题