redraw thing

P

Puppet_Sock

So my Excel app has VBA code that does a long file read and update
operation. This can take up to one hour. And the client wants it to
show a "please wait" message while it is doing this to help assure
that it isn't just hung.

So I added a non-modal user form with the message. Put it up on the
screen before the work starts, and unload it again after the work is
done.

My problem is, the form does not finish redrawing before the work
starts. And by then, Excel is sucking all the CPU doing the work, so
the form does not redraw. It shows an empty frame the entire time.
Which just makes it look more like things have hung rather than less.

So: What do folks do to show a "please wait" message during long
operations?
socks
 
G

GS

Puppet_Sock was thinking very hard :
So my Excel app has VBA code that does a long file read and update
operation. This can take up to one hour.

Geez, the file must be 10s of kigabytes in size OR you're doing it the
slow way for whatever reason you may have against a more efficient
approach!

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
 
P

Puppet_Sock

A single line:  DoEvents
...after the form is shown but before your "work" starts.

Also beneficial when trying to get messages boxes to go away.

Thanks Jim! That was exactly what I needed.
Socks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top