Juggler_IN
Active Member
- Joined
- Nov 19, 2014
- Messages
- 349
- Office Version
- 2003 or older
- Platform
- Windows
I have this VBA code to empty immediate window. On a standalone basis it works just fine. But, when I call it from another Sub then it clears the output from that Sub too inspite of the fact that I am calling the DoEmpty Sub before generating the new output. Any help?
VBA Code:
Public Sub DoEmpty()
SendKeys "^g", True ' Go to the VBE Immediate Window
SendKeys "^a", True ' Select content
SendKeys "{del}" ' Delete content
SendKeys "{f7}" ' Go back to VBE Project Window
End Sub