Try
Code:ActiveWindow.DisplayVerticalScrollBar = False
This is a discussion on How to disable or remove Scroll bar located at right side of Excel? within the Excel Questions forums, part of the Question Forums category; How to disable or remove Scroll bar located at right side of Excel?...
How to disable or remove Scroll bar located at right side of Excel?
Try
Code:ActiveWindow.DisplayVerticalScrollBar = False
HTH, Peter
Please test any code on a copy of your workbook.
You can also turn it off in the Options. For 2007 and later it's in the Advanced section; for 2003 and prior it's in the View tab.
Rory
Microsoft MVP - Excel.
Questions are the cure for ignorance
As far as I know you cannot do that for individual sheets. You can restrict the scroll area for individual sheets:
Code:Sheets("Sheet1").ScrollArea = "A1:Z20"
HTH, Peter
Please test any code on a copy of your workbook.
You could also use the activate event of the sheets to turn the scrollbar on and off.
Rory
Microsoft MVP - Excel.
Questions are the cure for ignorance
What is the exact code for me to lock or disable or remove the scrollbar?
I cant make it. sorry.
Try like this in the sheet's code module (pinching Rory's idea)
Code:Private Sub Worksheet_Activate() ActiveWindow.DisplayVerticalScrollBar = False End Sub Private Sub Worksheet_Deactivate() ActiveWindow.DisplayVerticalScrollBar = True End Sub
HTH, Peter
Please test any code on a copy of your workbook.
Then try like this
Code:Private Sub Worksheet_Activate() ActiveWindow.DisplayVerticalScrollBar = False Me.ScrollArea = "A1:Z20" End Sub
HTH, Peter
Please test any code on a copy of your workbook.
Bookmarks