PDA

View Full Version : testing when word/document is active



OTWarrior
11-23-2007, 05:33 AM
I have a document that flickers (due to the ammount of formfields needed)

So I was wondering how you test for word or the document itself being brought into focus, so I could find a way of stopping the screen from refreshing until it is needed.

any ideas?

TonyJollans
11-24-2007, 01:44 AM
I don't understand why the "ammount of formfields needed" causes flicker, and you don't say why or when the document comes in and out of focus, but doesn't ..
Application.ScreenUpdating = False
do what you want?

OTWarrior
11-26-2007, 07:19 AM
when I said into focus, or active, I mean if you are in another program and you then switch to the word document.

the ammount of formfields is about 500 in this 3 page document, many of them on page 2 (they are needed on that page only).

that code probably does what i want, except that I would have to turn it on again to be able to use the document. Plus I would need it on activate, not just on document load.

TonyJollans
11-26-2007, 08:10 AM
If you are referring to flickering in response to user action then you don't have code running at the time so application.screenupdating is not relevant.

You might want to look at the Application WindowActivate event but I don't really understand the problem.