Hello,
Debug.Print "TEXT" send/print "TEXT" to VBE immediate windowORfor x=1 to 100 'send/print 1 2 3 4 5 6 ....... 100 to VBE immediate windowdebug.print xnext
How can clear immediate window, using VBA code?Greetings!
Easy
Sub clearimmediatewindow() Dim i%
For i = 1 To 250 Debug.Print Next i
End Sub
I thank for Your answer!Macro below prints 1 Sub immediate_window_BhBp_put_in()'PUT IN IMMEDIATE WINDOWFor X = 1 To 200 'immediate have no more then 200 lines If Debug.Print 200 empty lines, immediate window is clearing
'You may show this when use this code:'For X = 1 To 1000Debug.Print XNext'Set WshShell = CreateObject("WScript.Shell")'WshShell.SendKeys "^g^{HOME}" 'goto first lineEnd Sub
How to run this code.Place this code in any Macros moduleOpen VBEPress Ctrl-g
print "immediate" in immediate windowPress Ctrl-space 'drop down list with macros beginning with "immediate" appearsSelect necessary macro using mouse or arrows - mmediate_window_BhBp_put_inPress key EnterGreetings!