Excel 2002: How to write protect a cell using password ?

G

Guest

Dear Sir,

Lets consider the folowing worksheet example:

Tommy prepares a budget and submit it to Jimmy for reviewing. The budget is
finally approved by Sally. All these are done in an Excel worksheet as
follows:

A B
1 USD
2 Budget Sales : 2,500,000
3 Budget Cost : 1,800,000
4 Budget Profit : 700,000


10 Prepared by : Tommy
11 Reviewed by : Jimmy
12 Approved by : Sally


May I know how could Tommy write protect his figures in cell B2:B4 by using
his own password ?

If Tommy need to change the figures what are the keyboard steps ?

The password that Tommy used is it different in each cell, or same
throughout the a single Excel file or the whole Excel program itself ? What
he need to do to change the password ?

As the document is passed around, can Jimmy and Sally acknowledge at B11 and
B12 with their own passwords ?



Thanks

Low
 
J

Jennifer

This should do the trick.

(1) Select the cells that you want to lock out.
(2) Righ click on the cells. Select Format Cells.
(3) In the FOrmat Cells pop-up bx, go to the Protection tab.
(4) Put a check-box in the Locked field.
(5) Click OK.
(6) Select Tools from the Menu.
(7) Select Protection.
(8) Enter a password if you so choose.
(9) Click OK.
 
J

Jennifer

Oops... Also, select the cells that you want people to be able to
edit and uncheck the Locked Field in the FOrmat Cells Pop-up. :)
 
G

Gord Dibben

You cannot password individual cells as you describe.

You could employ sheet_activate code that would check the log-in name to see
which user has the file open.

Each user would then have a certain set of cells they could alter in a protected
worksheet.

Private Sub Worksheet_Activate()
With Sheets("Sheet1")
..Activate
..Unprotect Password:="justme"
..Cells.Locked = True
End With

Select Case Environ("UserName")
Case "Tommy":
Range("B2:B4").Locked = False
ActiveSheet.EnableSelection = xlUnlockedCells

Case "Jimmy"
Range("C2:C4").Locked = False
ActiveSheet.EnableSelection = xlUnlockedCells

Case Else
MsgBox "Not authorized to make changes"

End Select
ActiveSheet.Protect Password:="justme"
End Sub

You then protect the VBAProject with a password so the code is unviewable.


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top