Keeping up with MoveEnd

R

Roy Lasris

I have a "MoveEnd" button on a Userform that will move the end point of
the selected text downward one paragraph. Sometimes the selected text (i.e.,
the end of the selected text) moves below the visible screen. I want the screen
to automatically scroll to keep up (like it does when scrolling with the mouse
or the keyboard). Are there commands or screen tests that I can apply to make
this happen?

Thanks, as always,

Roy
 
H

Helmut Weber

Hi Roy,
have look at this:
ActiveWindow.ScrollIntoView Selection.Range, True
and at related things like
Dim oWin As Window
Set oWin = ActiveDocument.ActiveWindow
oWin.VerticalPercentScrolled = _
oWin.VerticalPercentScrolled + 10
 

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