Scroll bars

  • Thread starter Thread starter Tazzy via OfficeKB.com
  • Start date Start date
T

Tazzy via OfficeKB.com

Hi everyone.

Is there any way of turning off the scroll bars in Excel for a particular
workbook, as opposed to turning them off for every workbook?
 
For each workbook......yes.

Save the workbook with the bars off.

Tools>Options>View and uncheck the two options

Close that workbook and open another.......bars are visible.

If you meant "worksheet", you cannot do this without event code.


Gord Dibben MS Excel MVP
 
Thanks for that Gord - easy when you know how!

So, how would I use event code for this, it's not something I've used before
 
Do you mean event code to turn scrollbars off when you activate a specific
worksheet?

Private Sub Worksheet_Activate()
With ActiveWindow
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
End With
End Sub

Private Sub Worksheet_Deactivate()
With ActiveWindow
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
End With
End Sub

This is sheet event code.

Right-click on sheet tab and "View Code"

Copy/paste the above into that sheet module.


Gord
 
Back
Top