Excel horizontal scroll bar using arrow keys

Chubster

New Member
Joined
Apr 28, 2019
Messages
16
Office Version
  1. 2013
Platform
  1. Windows
Hi,
I'm trying to find a way to enable or integrate a horizontal scroll bar in my spreadsheet that I can scroll one row at a time, up or down.
Preferably, a highlighted scroll bar.

I've read some articles but cannot seem to find anything that works.
I'm using a Dell 8700 PC with WIN 8.1 and Excel 2013.

Thank you.
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Not quite what you asked for but achieves something similar
Click on shape scrolls one row in either direction
Shapes are always visible (if manually scrolling beyond current window, click on any cell to return the shapes to right of screen)

UpDown.jpg


1. Add 2 shapes (I used 2 arrows) and rename as "Up" and "Down"

2. Add this code to a module and assign macro "Up_Click to shape "Up" and macro "Down_Click" to shape "Down"

VBA Code:
Sub Up_Click()
    ActiveWindow.SmallScroll Up:=1
    MoveArrows
End Sub
Sub Down_Click()
    ActiveWindow.SmallScroll Down:=1
    MoveArrows
End Sub

Sub MoveArrows()
    Dim c As Long, rUp As Long, rDown, uArrow As Shape, dArrow As Shape
   
    With ActiveSheet
        Set uArrow = .Shapes("Up")
        Set dArrow = .Shapes("Down")
    End With

    With ActiveWindow.VisibleRange
        c = .Cells(.Columns.Count).Column - 1
        rUp = .Cells(1).Row
        rDown = rUp + .Rows.Count - 3
    End With
   
    With ActiveSheet
        uArrow.Top = .Cells(rUp, c).Top
        uArrow.Left = .Cells(rUp, c).Left
        dArrow.Top = .Cells(rDown, c).Top
        dArrow.Left = uArrow.Left
    End With
End Sub

3. Add this code to the SHEET code window

(right click on sheet tab \ View Code \ paste code into that window)
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    MoveArrows
End Sub

4. Save workbook as macro enabled
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,583
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top