Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Immediate window stops updating on continuous run

Status
Not open for further replies.

03Explorer

Technical User
Sep 13, 2005
304
US
I have lengthy code that I have DEBUG.PRINT scattered within so I can watch the code process. I am currently getting the Immediate window will be populated with a few rows (not always the same rows) but no more populating to the immediate window. After a random time period, the Immediate window populates with all the rows. Nothing is "missing" from the immediate window, it appears the window is caching all vs printing right away.

Is there a known issue for immediate window not always displaying right away? Is there a caching feature in play that I am not aware of?

Side note: I eventually hope to use the immediate window (output) in a window for end users to see the app is working vs looking like it's locked up or frozen.
 
Instead of [tt]Debug.Print[/tt], why not use a simple label on your Form and display what's going on to the user. You can do something like:

[pre]
...
lblMsg.Caption = "Getting your coffee..."
lblMsg.Refresh
...
lblMsg.Caption = "Getting donuts now..."
lblMsg.Refresh
...
[/pre]


---- Andy

There is a great need for a sarcasm font.
 
Okay, but until I do make visible to end users, I am perplexed why the Immediate window doesn't show all rows of debug.print as they are happening vs caching then dumping a bunch at a time or wait until done processing to display.
 
Refreshing and the number of lines displayed by Debug.Print may be just limited.

I just tried this in Excel VBA:

[pre]
Dim i As Integer

For i = 1 To 500
Debug.Print "This is " & i
Next i
[/pre]
And I've got lines:[pre]
This is 302
This is 303
This is 304
This is 305
...
This is 498
This is 499
This is 500
[/pre]
So first 301 lines were over-written and not displayed at all.


---- Andy

There is a great need for a sarcasm font.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top