![]() |
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 |
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 |
All times are GMT +1. The time now is 10:02 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com