Immediate Window?

C

Charlotte E.

Hello,


- Is there a way to open and close the Immediate window from VBA?

- Is there a way to clear the Immediate window from VBA?


TIA,
 
D

dustinbrearton via OfficeKB.com

If you are just trying to make it appear and re-appear you can either go to
view in the menu bar and select immediate window or use shortcut key ctrl+g.
To clear it just highlight everything and hit delete.
 
N

NateBuckley

CTRL + G opens the window, you can close it by clicking the x in its window.

Or go to the menu - > View - > Immediate window.

To delete (clear) click inside window push

CTRL + A
Then push delete.

CTRL + A just selects all the text. Make sure you've put your cursor in the
actual window though.
 
B

Bob Phillips

Sub OpenImmediateWindow()
Application.SendKeys "^g"
End Sub


Sub ClearImmediateWindow()
Application.SendKeys "^g ^a {DEL}"
End Sub
 
C

Charlotte E.

Bingo! :)

Just needed to be preceeded with:

Application.VBE.MainWindow.Visible = True
Application.VBE.MainWindow.SetFocus

Thanks :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top