hi
look up the DoEvents command in
vb help.
this command turns control over to the operating system to complete commands
in it's cue (such as refresh the screen) then return control back to the
macro.
you might also look up the status bar function in
vb help as an alternative
to the use of a text box on the form. I prefer the status bar.
regards
FSt1
"Matt McQueen" wrote:
I have a text box on a form that I'm using to keep the user updated on what
the macro is doing after clicking on 'OK' (the form stays open). So at
different intervals during the running of the code, I use the command (or
something like it):
ufSelectRun.tbxStatusBar.Value = "downloading data..."
where ufSelectRun is the userform and tbxStatusBar is the text box. However
Excel seems to be quite selective about when it updates. So whilst the
command may be the first line of code post variable declaration, the text box
doesn't seem to update until the entire subroutine has finished.
Does anyone know the mechanics of how forms update? How do I get it to show
the updates at the right time?