Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 61
Default access specific areas of a protected worksheet

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default access specific areas of a protected worksheet


Make them press a button according to who they are. Put a macro behin
that button that unprotects the particular bit you want them to be abl
to change. Then make an automatic macro run on the close event for th
workbook (look up further stuff on events) basically write this int
your code in the workbook bit in the project explorer:

Private Sub Workbook_BeforeClose(Cancel As Boolean)

' make it re-protect here.

End Sub

If you don't trust them to press the right button then maybe you ca
make them login to excel or something, use an inputbox and find out wh
they are via a username (hard code it probably easiest), then you ca
add a password if they are total muppets to make it even safer. Ther
must be a hundred ways of making sure of this I imagine

--
gearo
-----------------------------------------------------------------------
gearoi's Profile: http://www.excelforum.com/member.php...fo&userid=2657
View this thread: http://www.excelforum.com/showthread.php?threadid=40191

  #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



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
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 05:39 AM.

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"