How to Hide and Unhide Horizontal and Vertical Scroll Bar in Excel

,

This post will guide you how to hide or unhide horizontal and vertical scroll bar in your current worksheet in Excel. How do I control Display of the Scroll Bars in Microsoft Excel 2013/2016.

1. Hide and Unhide Horizontal and Vertical Scroll Bar with Excel Options

If you want to hide both horizontal and vertical scroll bar, or just only hide one in your worksheet, you can change the excel setting in Excel Options dialog box. Just do the following steps:

#1 click File tab, and select Options menu. the Excel Options dialog will open.

hide or unhide scroll bar1

#2 select Advanced category, and scroll down to the Display options for this workbook section, then uncheck show horizontal scroll bar and show vertical scroll bar check boxes to hide all scroll bar in your workbook.

hide or unhide scroll bar2

#3 click Ok button, you will see that all scroll bar will disappear in your workbook.
#4 if you want to unhide or show all scroll bar (horizontal bar and vertical bar), you just need to check those two check boxes in the Display options for this workbook section.

2. Hide and Unhide Horizontal and Vertical Scroll Bar with VBA Macro

You can also use an Excel VBA Macro to achieve the result of hiding or unhiding horizontal and vertical scroll bars quickly. Just do the following steps:

#1 open your excel workbook and then click on “Visual Basic” command under DEVELOPER Tab, or just press “ALT+F11” shortcut.

Get the position of the nth using excel vba1

#2 then the “Visual Basic Editor” window will appear.

#3 click “Insert” ->”Module” to create a new module.

convert column number to letter3

#4 paste the below VBA code into the code window. Then clicking “Save” button.

Hide Scroll Bars:

Private Sub Workbook_Activate()
 With ActiveWindow
 .DisplayHorizontalScrollBar = False
 .DisplayVerticalScrollBar = False
 End With
 End Sub

Unhide Scroll Bars:

Private Sub Workbook_Deactivate()
 With ActiveWindow
 .DisplayHorizontalScrollBar = True
 .DisplayVerticalScrollBar = True
 End With
 End Sub

#5 press F5 key in your keyboard, or click Run button in the VBA editor.

You will see that the horizontal and vertical scroll bar will be hidden or shown in your workbook.

3. video: Hide and Unhide Horizontal and Vertical Scroll Bar

This Excel video tutorial where we’ll explore effective methods for managing scroll bars: using the ‘Excel Options’ feature and employing VBA (Visual Basic for Applications).

https://youtu.be/kD1gRd_y1sc

Leave a Reply