Jon,
Er... I have that creeping feeling that I'm in over my head. I'm not certain
I've grasped why my code doesn't change the value of the textbox until the
entire subroutine it's in is completed. Would making my userform modeless
cause commands to be executed as written?
Second stupid question: when you say repaint the form, what do you mean?
Cheers,
Matt
"Jon Peltier" wrote:
Problem with the status bar is that nobody ever notices it. A progress bar
is in the user's face.
I use a modeless userform, update the displayed text (and also the length of
the progress bar), then repaint the form.
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______
"FSt1" wrote in message
...
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?