Window.SmallScroll method (Excel)

Scrolls the contents of the window by rows or columns.

Syntax

expression.SmallScroll (Down, Up, ToRight, ToLeft)

expression A variable that represents a Window object.

Parameters

Name Required/Optional Data type Description
Down Optional Variant The number of rows to scroll the contents down.
Up Optional Variant The number of rows to scroll the contents up.
ToRight Optional Variant The number of columns to scroll the contents to the right.
ToLeft Optional Variant The number of columns to scroll the contents to the left.

Return value

Variant

Remarks

If Down and Up are both specified, the contents of the window are scrolled by the difference of the arguments. For example, if Down is 3 and Up is 6, the contents are scrolled up three rows.

If ToLeft and ToRight are both specified, the contents of the window are scrolled by the difference of the arguments. For example, if ToLeft is 3 and ToRight is 6, the contents are scrolled to the right three columns.

Any of these arguments can be a negative number.

Example

This example scrolls the contents of the active window of Sheet1 down three rows.

Worksheets("Sheet1").Activate 
ActiveWindow.SmallScroll down:=3

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.