Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel2007 limiting Pre-2007 Worksheet protection passwords to 15 c greg.campeau Excel Discussion (Misc queries) 2 July 2nd 08 06:13 PM
Protection with different passwords James Russell Excel Discussion (Misc queries) 1 October 24th 07 02:18 PM
How to protect different cells by diff. passwords? Mlavi Excel Worksheet Functions 2 August 19th 05 10:46 PM
have macros complete and enter passwords for sheet protection. nick-ipswich Excel Programming 1 March 13th 05 04:52 AM
Passwords and protection: wordtlengths? Rob[_5_] Excel Programming 3 November 19th 03 09:14 AM


All times are GMT +1. The time now is 08:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"