Thread: hide sheet tab
View Single Post
  #15   Report Post  
Posted to microsoft.public.excel.programming
Vasant Nanavati Vasant Nanavati is offline
external usenet poster
 
Posts: 1,080
Default hide sheet tab

Chris, in both your solutions the users are still able to see the worksheet,
in the first case by holding the mouse button down on the sheet tab, and in
the second case while the input box is on the screen. They may not be able
to activate it and do anything with it but they can certainly view the
contents (unless you have other code that moves the cellpointer to an unused
part of the sheet when it is activated, which would be inconvenient for the
authorized users).

--

Vasant

"chris" wrote in message
...
you can put a inputbox function in also to act as a password

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
If Sh.Name = "My Hide Sheet Name" Then
x = inputbox("Input Password")
if x = YourPassword Then Exit Sub
Worksheets("My Default Sheet Name").Activate
end if
End Sub

----- chris wrote: -----

in your projects window go to ThisWorkbook and in your code window''s

left dropdown box choose WorkBook, Right dropdown box choose SheetActivate.
Then put in this code:


Private Sub Workbook_SheetActivate(ByVal Sh As Object) "this

will be generated for you"


If Sh.Name = "My Hide Sheet Name" Then Worksheets("My

Default Sheet Name").Activate


End Sub "this will be generated for you"



----- gav meredith wrote: -----

Hi,

i have a workbook with which i want one of the sheets to not be

viewed
without a password. Is this possible?? I dont simply want to

hide the sheet
as a person could unhide it. The contents of the sheet are not

for all eyes.

Any suggestions????? Cheers!!!!