Hiding row and column headers, scroll bars

G

Guest

When my command button takes me to my sheet, I want the sheet not to show any
row or column headers or scroll bars. I tried just going to the sheet and
unchecking the boxes under tools, but they come right back again when I leave
the sheet then return to it.

Is there a way to put code somewhere that tells those to be hidden when a
sheet is selected? Thanks
 
T

Tom Ogilvy

With ActiveWindow
.DisplayHeadings = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
End With

However, this is not associated with the particular sheet that is selected.
If you go to another sheet and change them, they will be changed for all
sheets in that workbook. You will have to use the activate and possibly the
deactivate events to manage them it you only want it to be that way on one
sheet.

Chip Pearson's page on events
http://www.cpearson.com/excel/events.htm
 
G

Guest

This is great! Thank you. Can I add a line that will take all the toolbars
away also? I realized that I don't want want those either. Thanks!
 

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