horizontal & vertical scroll bars

G

Guest

I'm creating a spreadsheet which has a ' MENU 'sheet, so users can navigate
to other sheets within the spreadsheet via button clicks on the 'MENU' sheet.
Is it possible to remove the scoll bars from this 'MENU' sheet but NOT from
the
other sheets.

many thanks for any help
 
J

Jason Morin

Right-click on the worksheet tab, go to View Code, and
insert the following:

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
 
B

Bob Phillips

It's an window property so it would affect all sheets (unless in an other
window). But you could use worksheet event code to remove them when that
sheet is activated, and reinstate them when it is not. Like so

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 worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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