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.
- Hide and Unhide Horizontal and Vertical Scroll Bar with Excel Options
- Hide and Unhide Horizontal and Vertical Scroll Bar with VBA Macro
- video: Hide and Unhide Horizontal and Vertical Scroll Bar
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.
#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.
#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.
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.
#2 then the “Visual Basic Editor” window will appear.
#3 click “Insert” ->”Module” to create a new module.
#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.