Name

form.ScrollLeft [= setting]

Synopsis

Sets or returns the position of the horizontal scrollbar in points. The following code scrolls left one page at a time:

    Private Sub cmdPageLeft_Click(  )
        Me.ScrollLeft = Me.Left + Me.InsideWidth
        ' Reposition this control to keep it visible.
        cmdPageLeft.Left = cmdPageLeft.Left + Me.InsideWidth
    End Sub

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.