Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Two diff passwords(or protection) for sepate columns.
Hi members, I want help in an interesting case. Is there any way to protect the worksheet with two diif passwords...say column A to column N protected with one password and column O to colum column T with another password. Please advice..If not possible kindly suggest some alternate method TIA Roshi -- roshinpp_7 ----------------------------------------------------------------------- roshinpp_77's Profile: http://www.excelforum.com/member.php...fo&userid=3492 View this thread: http://www.excelforum.com/showthread.php?threadid=56892 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Two diff passwords(or protection) for sepate columns.
Sub Test()
Dim v Dim a As Byte ' assumes sheet1 already protected with "password" v = InputBox("Enter password A or B") Select Case v Case "pass1": a = 1 Case "pass2": a = 2 Case Else If Len(v) Then a = 99 End Select If a = 99 Then MsgBox "password not recognized" ElseIf a Then On Error Resume Next Worksheets("Sheet1").Unprotect "password" On Error GoTo errH If a = 1 Then Worksheets("Sheet1").Columns("A:N").Cells.Locked = False ElseIf a = 2 Then Worksheets("Sheet1").Columns("O:T").Cells.Locked = False End If Worksheets("Sheet1").Protect "password", True, True End If Exit Sub errH: MsgBox Err.Description End Sub Regards, Peter T "roshinpp_77" wrote in message ... Hi members, I want help in an interesting case. Is there any way to protect the worksheet with two diiff passwords...say column A to column N protected with one password and column O to column column T with another password. Please advice..If not possible kindly suggest some alternate method TIA Roshin -- roshinpp_77 ------------------------------------------------------------------------ roshinpp_77's Profile: http://www.excelforum.com/member.php...o&userid=34924 View this thread: http://www.excelforum.com/showthread...hreadid=568926 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel2007 limiting Pre-2007 Worksheet protection passwords to 15 c | Excel Discussion (Misc queries) | |||
Protection with different passwords | Excel Discussion (Misc queries) | |||
How to protect different cells by diff. passwords? | Excel Worksheet Functions | |||
have macros complete and enter passwords for sheet protection. | Excel Programming | |||
Passwords and protection: wordtlengths? | Excel Programming |