Word document flashes while vba code running in background

B

Bob Alston

I have two buttons on my Word document to run vba code. One updates
all calcs in the document. the other writes the data to an Access
database. While these are running, the word document flashes. But if
I make the word document not visible, the user may think the process
has crashed.

Any good way to display a progress bar or "in progress please wait"
message box while I hide the word document?

bob
 
P

Pesach Shelnitz

Hi Bob,

If you use the Selection object to navigate through your document to
retrieve data, the code will not run in the background, and I would expect
such flashing. However, if you use Range objects for this purpose, you should
have code that runs faster and not see any flashing. How are you locating and
copying the data in your Word document? Can you provide an example?
 
B

Bob Alston

Hi Bob,

If you use the Selection object to navigate through your document to
retrieve data, the code will not run in the background, and I would expect
such flashing. However, if you use Range objects for this purpose, you should
have code that runs faster and not see any flashing. How are you locatingand
copying the data in your Word document? Can you provide an example?

--
Hope this helps,
Pesach Shelnitz







- Show quoted text -

Let me clarify a bit.
When I am loading the data into the document, i make it invisible.
That does not seem to be a problem
to the user as they are awaiting its display. with over 1100 form
fields, it takes about 30 seconds or so.

After the user enters or updates data, I have vba code to update a
bunch of calculations, that change fields in the form.
when the user presses the button, the word document seems to flash and
change, possibly as it moves the focus to each field that is being
updated
by my vba code running.

What I would like to do is to hide the word document, display a
"Please wait" message box, then redisplay the word document when the
calculations are finished and close the message box.

How can I do this?

bob
 
B

Bob Alston

Let me clarify a bit.
When I am loading the data into the document, i make it invisible.
That does not seem to be a problem
to the user as they are awaiting its display.  with over 1100 form
fields, it takes about 30 seconds or so.

After the user enters or updates data, I have vba code to update a
bunch of calculations, that change fields in the form.
when the user presses the button, the word document seems to flash and
change, possibly as it moves the focus to each field that is being
updated
by my vba code running.

What I would like to do is to hide the word document, display a
"Please wait" message box, then redisplay the word document when the
calculations are finished and close the message box.

How can I do this?

bob- Hide quoted text -

- Show quoted text -

Anyone????
 

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