Hiding sheet tab names

B

bill_s1416

I created an automated workbook where I need to keep the sheet tab name
hidden from the user. I went into Tools-Options-View and unchecke
Sheet Tabs. Then I protected the workbook and the sheet yet the use
can still go into Tools-Options-View and re-check the Sheet Tabs t
view them again.

How do I lock the user out of viewing the sheet tabs? :confused
 
J

Jason Morin

You could use the "very hidden" property that prevents
users from viewing hidden worksheets without using VBA:

Dim ws2 As Worksheet
For Each ws2 In ThisWorkbook.Worksheets
If ws2.Name <> "Output" Then
ws2.Visible = xlSheetVeryHidden
End If
Next ws2

This will hide every worksheet except "Output".

HTH
Jason
Atlanta, GA
 
B

Bob Umlas

As I said in another section, use
Application.commandbars("worksheet menu
bar").Controls("Tools").Controls("Options...").Enabled=false
in the workbook_open event and
Applilcation.commandbars("worksheet menu
bar").Controls("Tools").Controls("Options...").Enabled=True
in either the workbook_BeforeClose event or in the Workbook_Deactivate event

Bob Umlas
Excel MVP
 
F

Fred

Bill,

If you want to good and hide the sheets, go to the VBE (Alt-F11), locate
your project (workbook) in the Project Explorer (View - Project Explorer),
select a sheet to be hidden, View (menu bar) - Properties. Find the Visible
property, and change it to xlSheetVeryHidden. Be careful, as after you've
done that, it may select the next sheet down, and you may not realize it.
This is a persistent property (doesn't require a macro to set it again upon
the next opening of the workbook), unlike some others.

The only way a user can get to the sheets now is to use the same procedure
(or write a macro) to reset the Visible property. You can lock the project
(Tools - VBA Project Properties - Protection) for some protection.
 
Top