How to write Macro for Login Form with VLookup in Excel? (VBA-Macro Code included) ~ Vicky's Blog
Subscribe For Free Updates!

We'll not spam mate! We promise.

How to write Macro for Login Form with VLookup in Excel? (VBA-Macro Code included)


User ID and Password login form is written in VBA-Excel.

Requirements are listed below. Based on the requirement, code is written in Excel-Macro. You can download and modify the excel sheet according to your requirements.
  1. User ID text field should contain only 6 numeric letters. (For Example, like a Office employee ID).
  2. User ID and Password field should not be empty.
  3. Password should match the respective user id in the UserPassword sheet.
  4. Cancel Button only should be used for cancellation the form.
  5. If the form is cancelled, entire excel sheet should be closed.
  6. Update password button should accept the new password.
  7. Reset button should clear all the fields in the login form.
  8. Logged in User ID should be displayed in the Cell no.D9 in the Login_ID Sheet. For Example:- If your logging with the user id(123456), respective name should be displayed
  9. in the Cell D9.

Default User ID and password for Login Form.

User ID Password
123456 password
















Download the Login Form Excel Sheet

You can provide your feedback and post your comments in the below comments form.

Socialize It and Share the post with your friends
SOCIALIZE IT →
FOLLOW US →
SHARE IT →

4 comments:

  1. Hi! I downloaded the excel login form but am unable to edit it due to the sheets being protected.

    ReplyDelete
  2. I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have enjoyed reading. Nice blog, I will keep visiting this blog very often.
    excel vba courses london

    ReplyDelete
  3. Hi, please can you tell me how to expand the users?
    When i try this the new user profile login works but, when trying to use the password change feature it breaks.

    ReplyDelete
  4. i reviewed the update code and believe that nicks error is because of the parameters set on the update button code line:

    myvalue = Application.WorksheetFunction.Match(Val(struser), Range("A1:A10"), 0)

    range ("a1:a10") is your culprit
    i believe that it would be more dynamic if set that range to an arrey and use redim preserve or alternatively set the range to a variable that catches the whole range on request including any additions.

    ReplyDelete