Scroll bars

  • Thread starter Tazzy via OfficeKB.com
  • 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?
 
G

Gord Dibben

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
 
T

Tazzy via OfficeKB.com

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
 
G

Gord Dibben

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top