If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
passwording tabs
i know you can password documents, protect cells, and worksheets.
But what i want to know is if you can password certain tabs in the workbook ? So only users you access the workbook, and know the password can assess certain tabs within the book (and thus view the data). --- Message posted from http://www.ExcelForum.com/ |
#2
|
|||
|
|||
passwording tabs
Hi Lee!
You can apply different passwords to different sheets. Select the sheet Tools Protection Protect Sheet Give and confirm password for that sheet OK Select the next sheet However, don't use this process for protecting sensitive data because these passwords are very easily circumvented: See: JE McGimpsey http://www.mcgimpsey.com/excel/removepwords.html -- Regards Norman Harker MVP (Excel) Sydney, Australia "Lee_Woodcock " wrote in message ... i know you can password documents, protect cells, and worksheets. But what i want to know is if you can password certain tabs in the workbook ? So only users you access the workbook, and know the password can assess certain tabs within the book (and thus view the data). --- Message posted from http://www.ExcelForum.com/ |
#3
|
|||
|
|||
passwording tabs
thank you for that,
but its not quite what imeant ok, a standard excel workbook has 3 sheets - defaulting to sheet1 when you open it. what i want is a password on say sheet3 - so as soon as you click on sheet 3 your asked for a password. confirmation of this password will then display sheet 3, else you wont be able to see the contents. ? --- Message posted from http://www.ExcelForum.com/ |
#4
|
|||
|
|||
passwording tabs
Hi Lee!
Use a Workbook_SheetChange event handling subroutine for this. -- Regards Norman Harker MVP (Excel) Sydney, Australia "Lee_Woodcock " wrote in message ... thank you for that, but its not quite what imeant ok, a standard excel workbook has 3 sheets - defaulting to sheet1 when you open it. what i want is a password on say sheet3 - so as soon as you click on sheet 3 your asked for a password. confirmation of this password will then display sheet 3, else you wont be able to see the contents. ? --- Message posted from http://www.ExcelForum.com/ |
#5
|
|||
|
|||
passwording tabs
cool, so there is a way to do this
next step - lol - how ? --- Message posted from http://www.ExcelForum.com/ |
#6
|
|||
|
|||
passwording tabs
Hello Lee
Since you still want worksheet tabs to be visible, here's a suggestion: 1- hide rows and columns in the relevant sheet 2- protect sheet 3- place the sample code below into thisWorkbook (amend accordingly) Tip: right-click on the Excel Icon situated immediately on the left from the File menu of Excel, choose View code and paste the code 4- please bear in mind that this will only work for macros enabled ;-) Cordially Pascal Private Sub Workbook_SheetActivate(ByVal Sh As Object) Dim GiveSesame$ Select Case Sh.Name Case Is = "Feuil2" If Worksheets(Sh.Name).Rows.Hidden False Then GiveSesame = InputBox("Password please ?", "Protected sheet") If GiveSesame = "password" Then With Worksheets(Sh.Name) .Unprotect (GiveSesame) .Rows.Hidden = False .Columns.Hidden = False End With Else: MsgBox "Cancelled or Wrong password", vbCritical, "Sorry" End If End If End Select End Sub Private Sub Workbook_SheetDeactivate(ByVal Sh As Object) Select Case Sh.Name Case Is = "Feuil2" With Worksheets(Sh.Name) If .Rows.Hidden = False Then .Rows.Hidden = True .Columns.Hidden = True .Protect ("password") End If End With End Select End Sub "Lee_Woodcock " a écrit dans le message de ... cool, so there is a way to do this next step - lol - how ? --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | |
Display Modes | |
|
|