DisplayScrollBars Application Property in VBA is used to either stop or display the scroll bar for all workbooks. It has Boolean value either True or False. If the value is Tue, it displays the scroll bar for all workbooks. If the value is False, it stops display the scroll bar for all workbooks. Please find the syntax and examples on DisplayScrollBars property of application object in the following section.
VBA DisplayScrollBars Application Property – Syntax
Here syntax for DisplayScrollBars Property of application object in VBA.
Application. DisplayScrollBars
Where DisplayScrollBars as String.
In the above syntax Application represents object and DisplayScrollBars is the Property of Application object.
VBA DisplayScrollBars Application Property: Example 1
Please find the below example for DisplayScrollBars Property of application object in excel VBA. The below example doesn’t displays the scrollbar for all workbooks.
Sub Appl_Display_ScrlBar_Ex1() 'DisplayScrollBars is the property of application object Application.DisplayScrollBars = False End Sub
VBA DisplayScrollBars Application Property: Example 2
Please find the below example for DisplayScrollBars Property of application object in excel VBA. The below example displays the scrollbar for all workbooks.
Sub Appl_Display_ScrlBar_Ex2() 'DisplayScrollBars is the property of application object Application.DisplayScrollBars = True End Sub
VBA DisplayScrollBars Application Property – Instructions
Please follow the below steps to execute the VBA code to save the excel file.
Step 1: Open any existing Excel Application.
Step 2: Press Alt+F11 – This will open the VBA editor window.
Step 3: Insert a code module from then insert menu.
Step 4: Copy the above code and paste in the code module which have inserted in the above step.
Step 5: Now press F5 to execute the code.
Step 6: Notice the above macro results on the Worksheet for better understand.