View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Excel to have User Name and Password?

How about this idea?

Sub askforpassword()
On Error GoTo nogood
ans = InputBox("enter password")
If Range("passwords").Find(ans).Row 0 Then
'MsgBox "OK"
Sheets("sheet7").Unprotect
Exit Sub
End If
nogood: MsgBox "Access denied"
End Sub

--
Don Guillett
SalesAid Software

wrote in message
ups.com...
Hello fellow programmers!

I was woundering if any one knew some code to allow me to do the
following...

I have 10 employees with 10 unique user names and 10 unique
passwords...

I have all 10 employees listed in Column A and all the passwords listed
in Column B, so I am wondering is it possible to create a UserForm to
allow a person to enter the user name and password to gain access to
workbook if it matches correctly to their name and password off the
values on the spreadsheet? Any help is greatly appreciated!!!