Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 23rd, 2004, 05:39 PM
Registered User
Join Date: Jun 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to clear Immediate Window in code?

Any one know how to clear Immediate Window in code?
Old April 26th, 2004, 12:16 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts

the only way to do so it to use an addin. There are many commercial addin in the market and you can also roll your own. This is one found using google:


Old September 16th, 2010, 09:47 AM
Registered User
Join Date: Sep 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Smile Clear the Immediate window VB6 and VBA

you need to add reference to
microsoft visual basic for applications extensibility 5.3

Public Function ClearImmediateWindow()
On Error Resume Next
Dim winImm As VBIDE.Window
Dim winActive As VBIDE.Window
' set the Window object variable to the Current Window
144 Set winActive = VBE.ActiveWindow
' set the Window object variable to the Immediate Window
145 Set winImm = VBE.Windows("Immediate")
' Clear
146 winImm.SetFocus
147 SendKeys "^({Home})", True
148 SendKeys "^(+({End}))", True
149 SendKeys "{Del}", True
150 Debug.Print Now
151 Set winImm = Nothing
152 winActive.SetFocus
End Function

Similar Threads
Thread Thread Starter Forum Replies Last Post
clear datagridview me.ajeesh C# 2005 1 July 27th, 2007 11:28 PM
can you get window.opener data in server side code edmicman Javascript 3 August 27th, 2005 03:41 AM
Running procedure - code window! penta Access 12 February 1st, 2005 04:43 AM
Maximising the browser window in code badgolfer ASP.NET 1.0 and 1.1 Basics 6 June 11th, 2004 03:59 AM
Why doesn't this code open window to fullscreen? savoym Javascript 4 July 23rd, 2003 09:51 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.