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


This content was proof-read by Grammarly. You can Try Grammary for FREE

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.


Are you a .NET Developer planning to integrate GraphQL for .NET in your Application? Check out this book BUY & DOWNLOAD GRAPHQL.NET COOKBOOK
Option Explicit 
Private Sub HideScrollBars() 
    With ActiveWindow 
        .DisplayHorizontalScrollBar = False 
        .DisplayVerticalScrollBar = False 
    End With 
End Sub
%d bloggers like this: