Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This page is specific to the Visual Basic for Applications (VBA) Language Reference for Office 2010.
Moves the scroll bar on an object.
Syntax
object.Scroll( [ ActionX [, ActionY]])
The Scroll method syntax has these parts:
Part |
Description |
---|---|
object |
Required. A valid object name. |
ActionX |
Optional. Identifies the action to occur in the horizontal direction. |
ActionY |
Optional. Identifies the action to occur in the vertical direction. |
Settings
The settings for ActionX and ActionY are:
Constant |
Value |
Description |
---|---|---|
fmScrollActionNoChange |
0 |
Do not scroll in the specified direction. |
fmScrollActionLineUp |
1 |
Move up on a vertical scroll bar or left on a horizontal scroll bar. Movement is equivalent to pressing the up or left arrow key on the keyboard to move the scroll bar. |
fmScrollActionLineDown |
2 |
Move down on a vertical scroll bar or right on a horizontal scroll bar. Movement is equivalent to pressing the right or down arrow key on the keyboard to move the scroll bar. |
fmScrollActionPageUp |
3 |
Move one pageup on a vertical scroll bar or one page left on a horizontal scroll bar. Movement is equivalent to pressing PAGE UP on the keyboard to move the scroll bar. |
fmScrollActionPageDown |
4 |
Move one pagedown on a vertical scroll bar or one page right on a horizontal scroll bar. Movement is equivalent to pressing PAGE DOWN on the keyboard to move the scroll bar. |
fmScrollActionBegin |
5 |
Move to the top of a vertical scroll bar or to the left end of a horizontal scroll bar. |
fmScrollActionEnd |
6 |
Move to the bottom of a vertical scroll bar or to the right end of a horizontal scroll bar. |
Remarks
The Scroll method applies scroll bars that appear on a form, Frame, or Page that is larger than its display area. This method does not apply to the stand-alone ScrollBar or to scroll bars that appear on a TextBox.