Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default cell edit by user


I have a workbook that is used by more then one users, in the case 8
pepole. but i need it to were they can only edit there cells and no one
else.


--
wally0206
------------------------------------------------------------------------
wally0206's Profile: http://www.excelforum.com/member.php...o&userid=14995
View this thread: http://www.excelforum.com/showthread...hreadid=546100

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 695
Default cell edit by user

maby somthing like this

Private Sub Workbook_Open()
Dim u As String
u = InputBox("User name please :")
If u = "jones1" Then Sheets("Ark1").Range("A1:A10").Select: Selection.Locked
= False
If u = "jones2" Then Sheets("Ark1").Range("B1:B10").Select: Selection.Locked
= False
If u = "jones3" Then Sheets("Ark1").Range("C1:C10").Select: Selection.Locked
= False
If u = "jones4" Then Sheets("Ark1").Range("D1:D10").Select: Selection.Locked
= False
If u = "jones5" Then Sheets("Ark1").Range("E1:E10").Select: Selection.Locked
= False
If u = "jones6" Then Sheets("Ark1").Range("F1:F10").Select: Selection.Locked
= False
If u = "jones7" Then Sheets("Ark1").Range("G1:G10").Select: Selection.Locked
= False
If u = "jones8" Then Sheets("Ark1").Range("H1:H10").Select: Selection.Locked
= False
If u = "x" Then Sheets("Ark1").Range("A1:IV65000").Select: Selection.Locked
= False
Sheets("Ark1").Protect Password:="p", DrawingObjects:=True, Contents:=True,
Scenarios:=True
Range("A1").Select
End Sub


Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets("Ark1").Unprotect Password:="p"
Range("A1:H10").Select
Selection.Locked = True
Range("A1").Select
End Sub





"wally0206" skrev:


I have a workbook that is used by more then one users, in the case 8
pepole. but i need it to were they can only edit there cells and no one
else.


--
wally0206
------------------------------------------------------------------------
wally0206's Profile: http://www.excelforum.com/member.php...o&userid=14995
View this thread: http://www.excelforum.com/showthread...hreadid=546100


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default cell edit by user

"wally0206" wrote in
message ...

I have a workbook that is used by more then one users, in the case 8
pepole. but i need it to were they can only edit there cells and no one
else.


--
wally0206
------------------------------------------------------------------------
wally0206's Profile:

http://www.excelforum.com/member.php...o&userid=14995
View this thread: http://www.excelforum.com/showthread...hreadid=546100


I think Microsoft is contemplating such feature for a future release of
Excel, but for now I can only offer of a rough solution:

1) Protect the sheet with password. This password is YOUR password (you will
need it to protect/unprotect the sheet with VBA)

2) Write an AutoOpen macro, that would do the following when the user opens
the workbook:
a) Unprotect sheet, lock all cells, protect sheet again
b) Show an Inputbox,into which each user has to input HIS/HER password (you
have to inform each of your 8 users an individual password for editing).
c) If the user has entered his/her correct 'password' (it's more a barrier
to for unauthorized users to execute the rest of the macro and has nothing
to do with the 'real' PW used by Excel), let the macro unprotect the sheet,
unlock the cells that the user is allowed to edit, then protect the sheet
again.

Don't forget to protect the code with a password, otherwise users can see
other users password by looking at the code.

Good luck.

Joerg




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
Attempted edit of protected cell jumps user to another cell megangomez Excel Discussion (Misc queries) 2 August 6th 09 12:54 AM
multiple user in excel to edit a userform Rachel Excel Discussion (Misc queries) 2 November 25th 08 04:47 PM
allow a user to edit ranges in a protected worksheet McA Excel Worksheet Functions 3 September 16th 08 08:38 AM
Protect spreadshet, but allow user edit range Souris Excel Programming 2 August 22nd 05 05:26 AM
Edit worksheet while a user form is on? Huyeote Excel Programming 0 September 12th 03 04:05 AM


All times are GMT +1. The time now is 06:54 AM.

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"