How to hide horizontal or vertical scroll bar using VBA Code in Excel ?

Here’s a VBA code that hides the horizontal and vertical scroll bar in Microsoft Excel.

How to hide horizontal or vertical scroll bar using VBA Code in Excel ?

1. Open the Microsoft Visual Basic for Applications Window using the ALT + F11 keyboard shortcut key.
2. Select Insert -> Module and then paste the following code snippet.

Option Explicit 
Private Sub HideScrollBars() 
    With ActiveWindow 
        .DisplayHorizontalScrollBar = False 
        .DisplayVerticalScrollBar = False 
    End With 
End Sub
%d