problem with refresh

K

klav

I have a macro that inserts a checkbox at the beginning of each line of a
document, and protects the document for form entry. For some users, after the
checkboxes are inserted and the document is protected, the screen does not
refresh so the user sees only part of the text -- the majority of the screen
appears blank. If you use the vertical scroll bar to scroll down and back
up, it repaints and looks fine.
I have the following codes in the macro after the protection (also tried
putting them before the protection but it didn't help):

Selection.EndKey Unit:=(wdStory)
Selection.HomeKey Unit:=(wdStory)
Application.ScreenUpdating = True
Application.ScreenRefresh

I have to stress that this does not happen for all users, only some. Is
there some other coding sequence I can use to ensure it works for everyone
all the time?
 
H

Helmut Weber

Hi,

I think, it's rather a problem of the system's graphics.

Maybe if you scroll a bit, the screen will repaint, like:

ActiveWindow.SmallScroll up:=1
ActiveWindow.SmallScroll down:=1

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 

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