View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Chris Chris is offline
external usenet poster
 
Posts: 244
Default Password protect data entry to cell

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