LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default access specific areas of a protected worksheet

Give each user a specific password to enter and unlock their "area" using
your password on the sheet. Run this on the Workbook Open Event and relock
the cells on Workbook Close event.
In This Workbook code module:

Private Sub Workbook_Open()
Password
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Worksheets("Sheet1").Unprotect Password:="yourpassword"
Columns("A:AG").Locked = True
Worksheets("Sheet1").Protect Password:="yourpassword"
End Sub

In a General code module:

Sub Password()
Dim pswrd

pswrd = InputBox("Enter Password")
If pswrd = "user1" Then
Worksheets("Sheet1").Unprotect Password:="yourpassword"
Columns("A:M").Locked = False
Worksheets("Sheet1").Protect Password:="yourpassword"
ElseIf pswrd = "user2" Then
Worksheets("Sheet1").Unprotect Password:="yourpassword"
Columns("N:AA").Locked = False
Worksheets("Sheet1").Protect Password:="yourpassword"
ElseIf pswrd = "user3" Then
Worksheets("Sheet1").Unprotect Password:="yourpassword"
Columns("AB:AG").Locked = False
Worksheets("Sheet1").Protect Password:="yourpassword"
End If
End Sub

Mike F
"****al shah" wrote in message
...
Hi to all

I have Protected one Excel File which is open by more than 3 person. What
i
want to do is there any way that if 1st person can open file than he can
only make change in column A to M only and if 2nd person can open that
file
than he can only make changes in column N to AA. and 3d person can open
that
file can only make changes in column AB to AG.

I am useing Excel 2000 any Help.
Thanks
****al



 
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
How to give access to certain cells in the protected worksheet ? fbagirov Excel Worksheet Functions 4 October 19th 06 12:42 AM
Protected Worksheet - tabs stop working in certain areas bucketowater Excel Discussion (Misc queries) 0 January 26th 06 05:27 AM
Edit specific range in protected worksheet Rao Ratan Singh New Users to Excel 1 December 20th 05 01:13 PM
Can specific cells on a worksheet be hidden & password protected? Ann Excel Worksheet Functions 6 July 5th 05 09:08 PM
Using VC++, ODBC Excel Driver: Access specific worksheet? Ryan Excel Programming 0 May 27th 04 09:18 PM


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

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

About Us

"It's about Microsoft Excel"