+ Reply to Thread
Results 1 to 9 of 9

User Login Form using VBA

  1. #1
    Registered User
    Join Date
    02-26-2014
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    33

    User Login Form using VBA

    Hi All,

    Iam a new user of VBA. And Iam creating a user login form. I have a work book with 2 userforms in it (Login and Activities). I have another workbook which has the list of usernames and passwords. Now I have to give access to these users so that they should be able to login with their user id, password and their role and once they log in they should be able to view the Activities userform.

    Please help me in this.
    Thanks in advance...
    Attached Files Attached Files

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: User Login Form using VBA

    Hello sn152,

    Welcome to the Forum!

    Do you the Option Button to set for a valid login?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    02-26-2014
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: User Login Form using VBA

    Hi Leith Ross,

    Please see the attached updated file.

    Thank you!
    Attached Files Attached Files
    Last edited by sn152; 04-23-2014 at 01:05 PM.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: User Login Form using VBA

    Hello sn152,

    The attached workbook now has a login form. I am sure this will need a little revision to do what you want, but the basic structure is programmed.

    User Form "Login" Code
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-26-2014
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: User Login Form using VBA

    Hi Leith Ross,

    First of all thank you so much for helping me. But with the code that you provided, even if I dont select the role it is letting me to login. Is there a way where only if I select the corrct role, it should allow me to login.

    Thanks

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: User Login Form using VBA

    Hello sn152,

    Here is the update workbook and user form code.

    User Form "Login" Code
    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    02-26-2014
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: User Login Form using VBA

    Hi Leith Ross,

    This is wonderful. This is working fine... Thank you so much for helping me....

  8. #8
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: User Login Form using VBA

    Hello sn152,

    You're welcome. Let me know if have any more questions.

  9. #9
    Registered User
    Join Date
    09-03-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    14

    Re: User Login Form using VBA

    What sheet does this point too, after the login is successful?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Login sheet rather than login form?
    By mdovey in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-06-2013, 05:17 PM
  2. [SOLVED] User Form to execute search and return all values to the user form for editing
    By allwrighty in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-11-2013, 10:40 PM
  3. [SOLVED] Excel vba user form- open directly to user form not worksheet
    By PANTECH in forum Excel Programming / VBA / Macros
    Replies: 26
    Last Post: 04-24-2013, 05:07 PM
  4. Insert user's name into cell based on windows user login when a button is clicked.
    By jonvanwyk in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 08-16-2011, 01:08 PM
  5. find the login user and saving /login the name
    By belkin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-03-2008, 08:24 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1