View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
gocush[_10_] gocush[_10_] is offline
external usenet poster
 
Posts: 1
Default User name & password access to Excel files in a folder


You can easily do this independent of Network access:

Set up a Master worksheet with columns for UserName, Password.
Populate these columns.

In the Auto_Open sub, open a Userform with 2 Textboxes, and labels
which direct the user to enter his/her UserName and Password (this can
be an organizational password or one which YOU assign to the user).
Also put an OK button on the userform.

In the Userform code for the OK click event, do a VLOOKUP of the
Textbox1.Value in your UserName list and return the value from your
Password list.
If this value equals Textbox2.value, then you have a match, so open the
file or activate a desired sheet. If not a match, then give a message
box and return to the userform for another try.

A Cancel Button on the UserForm will allow the user to quit. Or you
could automatically quit if the user fails on a 2nd attempt.

This "permission concept" can be expanded with columns on your Master
sheet with Sheet Names or Workbook Names which are "accessible" to that
particular user.


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/