Results 1 to 7 of 7

Thread: clearing debug/immediate window

  1. #1
    zubair
    Guest

    clearing debug/immediate window

    Can you clear the contents of the immediate/debug within the VB code. I know you can do debug.print to display but i want to clear the contents before. Any suggestions???

    Thanks

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    I have actually submitted a suggestion to Microsoft that a
    Debug.Clear should be made available, but as of VB6, it is not, and I've never found a programmatic way of clearing the immediately window.

  3. #3
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    There's a freeware add-in here that does it http://k-offline.com/mz-tools/mztools2_eng.htm

  4. #4
    You'll be able to do this in VB.NET, I believe. Right now, the only way is really cheap (other than an addin):

    VB Code:
    1. Dim i As Integer
    2. For i = 1 to 100
    3.     Debug.Print ""
    4. Next i

    Really cheap.

  5. #5
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    That doesn't work Arien, it just prints 100 zero-length strings after anything that's already in it.

    And what did I tell you about integers/longs!?!

  6. #6
    VB Code:
    1. Dim i As Long
    2. For i = 1 to 100
    3.     Debug.Print " "
    4. Next i

    It should. Print also spits out a newline. But if you want to be anal, you can make it print a vbCrLf instead.

  7. #7
    zubair
    Guest
    thanks chrisjk for that tool, it is very useful indeed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width