Password protect data entry to cell

B

Brian

I have a large workbook that has the majority of cells
locked and password protected. There are several cells
left unprotected to allow for data entry. On one
worksheet, the FrontPage sheet I have five cells that I
need to stop data entry from anyone other that the
manager of the section. Can I use code and an a message
input box to accept a suitable password to allow data
entry to these cells. The code could include unprotect
range.

I am currently using .enable and .disable to allow acces
to the cells. whenthe first cell has data added it gives
acces to the second cell etc. I need to password protect
access to the first cell, and each other as they become
available.

Hope this makes sense, Thanks in advance to anyone who
can help with code.

Regards

Brian
 
G

Gord Dibben

Brian

Which version of Excel?

2002 and 2003 have under Tools>Protection "allow users to edit ranges"

You can set passworded access to cells for these users.

Gord Dibben Excel MVP
 
G

Guest

Try this
Put this code in your worksheets selection change event , and follow directions noted by >

Private Sub Worksheet_SelectionChange(ByVal Target As Range
'>>put the cell adresses for your 5 entry cells her
Set myrange = Range("A12,B14,C16,D18,E20"
Set isect = Application.Intersect(Range(myrange.Address), Range(Target.Address)
If isect Is Nothing Then Exit Su
x = InputBox("Please Enter Password", "Password required!"
'>>Put your password here >>Send user to neutral cel
If x <> "DOG" Then MsgBox ("Incorrect Password!"): Range("A1").Select
End Su

----- Brian wrote: ----

I have a large workbook that has the majority of cells
locked and password protected. There are several cells
left unprotected to allow for data entry. On one
worksheet, the FrontPage sheet I have five cells that I
need to stop data entry from anyone other that the
manager of the section. Can I use code and an a message
input box to accept a suitable password to allow data
entry to these cells. The code could include unprotect
range

I am currently using .enable and .disable to allow acces
to the cells. whenthe first cell has data added it gives
acces to the second cell etc. I need to password protect
access to the first cell, and each other as they become
available

Hope this makes sense, Thanks in advance to anyone who
can help with code

Regard

Bria
 
B

Brian

Chris
I have entered the code as you suggested, added my range,
which is E44:E49, and entered my password, but nothing
hasppens when I open the worksheet and click on any of
the cells in question.

I am using Excel 2000 with windows XP Home edition.

Brian
-----Original Message-----
Try this:
Put this code in your worksheets selection change
event , and follow directions noted by >>
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'>>put the cell adresses for your 5 entry cells here
Set myrange = Range("A12,B14,C16,D18,E20")
Set isect = Application.Intersect(Range
(myrange.Address), Range(Target.Address))
 
P

Paul B

Brian, did you enter it as E44:E49? if so try this E44,E45,E46,E47,E48,E49

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 97
** remove news from my email address to reply by email **
 

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