ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Scroll Bar- Move one cell to right (https://www.excelbanter.com/excel-programming/443241-scroll-bar-move-one-cell-right.html)

Thomp

Scroll Bar- Move one cell to right
 
Is there a way to use a control bar that will move the focus to right
one cell. Looking for the same kind of functionality as a freeze pane
but with a control box scroll bar on the worksheet

AB[_2_]

Scroll Bar- Move one cell to right
 
I'm not sure i understood completely but try putting the scrollbar
control (ScrollBar1) onto your ws and then play around with this code
and see what happens.

Private Sub ScrollBar1_Change()
Static ScrollValue As Long
Dim COLs_To_Move As Long

COLs_To_Move = Me.ScrollBar1.Value - ScrollValue
ActiveWindow.SmallScroll toright:=COLs_To_Move
ScrollValue = Me.ScrollBar1.Value
ActiveCell.Offset(0, COLs_To_Move).Select


End Sub


On Jun 21, 7:52*pm, Thomp wrote:
Is there a way to use a control bar that will move the focus to right
one cell. *Looking for the same kind of functionality as a freeze pane
but with a control box scroll bar on the worksheet




All times are GMT +1. The time now is 02:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com