Displaying a progress value

Hi all

What’s the trick to making NSB.ShowProgress(“Progress x%”) work? The counter doesn’t display till the 100% mark. In ExcelVBA I’d do a .repaint function in the loop displaying the text.


Have you tried the NSB.ShowProgress sample?

Yes. That works in a delay timed function but I’m trying to display which “count” a For loop is up to during “loading”. Shows the first only eg following would only show “Up to row 0”

For r = 0 to 500
  NSB.ShowProgress("Up to row " & r)
  more code....

I tried the ShowProgress in a function to no success

That won’t work. Execution of the loop needs to stop for the screen to be updated.

Hi George, what is the code to stop the program?

@rijona, I am not sure how your question relates to this topic.

If it’s a different topic, then create a new topic for it.

I think what rijona is asking is “how do you get execution to stop?” Answer is the screen will redraw at the end of a function when there is no more code to execute. I did a loop counter like this…

Function counter() 
  For r = 0 to 10
   Settimeout(increasecounter, 50}
End function

Function increasecounter{} 
  Showprogress("counting" & r & " of 10")
End function 

Somebody correct me if I’m wrong but the settimeout stops execution long enough for the screen to redraw.

I haven’t done any playing around to see how short the settimeout delay could be. Imagine it is different for different processor speeds.