CHRIS RAE'S VBA PAGES

Routine Archive


Routine:DeleteTextInDebugWindow2
Description: The other way to clear all the text in the Immediate window. Cindy Meister wrote this one too.

Sub DeleteTextInDebugWindow2()
    ' Chris Rae's VBA Code Archive - http://chrisrae.com/vba
    Application.VBE.Windows("Immediate").SetFocus
    Application.VBE.CommandBars("Menu Bar").Controls("&Edit").Controls("Select &All").Execute
    SendKeys "{Del}"
End Sub

You're free to use these routines for anything you want - all I ask is that for commercial use you give me credit somewhere. You may instead want to head back to the index for my Visual Basic for Applications Pages or the main routines archive page.