Use VBA to Clear Immediate Window?

前端 未结 16 1311
刺人心
刺人心 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:46

    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
    

提交回复
热议问题