Reputation: 96753
With the VBA window active, I can open the Immediate Window (really a pane) in two ways:
I can close the Immediate Window with the mouse by clicking the red "x" at the Window's upper right-hand corner.
How can I close the Immediate Window (only the bottom pane) using only the keyboard (without the mouse) ??
Upvotes: 3
Views: 1961
Reputation: 2800
Since it's really a window (not longer a command) you can use Alt+F4 (close active instance) like any other application (as long as its the active window)
UPDATE:
You may try Ctrl+F4 -close active window of the instance- (if it's not docked).
If it's docked, it belong to the instance of vba itself, so, I'm not quite sure how would you call the element to take it off from the dock and then close it.
Upvotes: 2
Reputation: 71177
You could write a macro for this :)
Have this code in a standard module (requires programmatic access to the VBIDE API):
Public Sub CloseImmediatePane()
Application.VBE.Windows("Immediate").Close
End Sub
Programmatically closing the immediate pane from the immediate pane will only make it flicker (close and come back), so you can't run this macro from the immediate pane... but you can place your cursor inside the procedure and hit F5, and it works, docked or not!
Funky creative ideas are allowed, right?
Upvotes: 7