Creating Excel Userform with multiple Users

I am trying to create a userform with list of users who can select there name and enter the password and log into the file. Also I want to add Change password button to the form and also all the changed and the current username and password should be stored in Access DB.
Bhushan PatilWork Analysis EngineerAsked:
Who is Participating?
 
Neil FlemingConsultant and developerCommented:
Bhushan: try the attached two files.

The Excel workbook implements Microsoft ActiveX dataobjects in tools/references.

The userform fires on workbook open and attempts to connect to the access database attached. It assumes you are using Access 2007-13 in the routine "ConnectDB" (uses a connection string for OLEDB 12).

The connection won't work on your first attempt as the database location is set to my own c: drive in module mTools at:

Public Const DBfolder = "c:\neil work\software\excel\expertsexchangequestions\access\"

Open in new window


So you will get an error popup until you change this location.

Thereafter the login form should populate usernames from the Access table tUsers, and I built some simple tools to check the entered password against the password stored in the database, and to change it. See code in the userform, and in the mTools module.

Right now, all the passwords are the same as the user names.

To test the form, the easiest thing is to type "ulogin.show" in the Immediate window of the VBA code window, rather than re-opening the file.

Hope this sets you on the right path.
PW.accdb
PassWordLogin.xlsm
0
 
John TsioumprisSoftware & Systems EngineerCommented:
Better to move entirely application to Access...
0
 
Bhushan PatilWork Analysis EngineerAuthor Commented:
I want to create a userform using excel that's the requirement actually
0
 
John TsioumprisSoftware & Systems EngineerCommented:
Then just google "tutorial create userform excel" and you will get a ton of info on it.
Since you have Access database in use and probably you use it to feed Excel i reckon is the right point to jump to Access...
0
 
Bhushan PatilWork Analysis EngineerAuthor Commented:
Thank you so much Neil Fleming it works.
1
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.