+ Reply to Thread
Results 1 to 2 of 2

Username and Password Login Dilemma

  1. #1
    Registered User
    Join Date
    08-08-2014
    Location
    South Africa
    MS-Off Ver
    2010
    Posts
    1

    Username and Password Login Dilemma

    Hi Guys,

    I am new to VBA.

    A colleague and I have created a macro enabled workbook, and have added 2 buttons to the Opening screen (sheet).

    1 button for register
    1 button for Login

    I have created the buttons and user forms.
    The register button currently is allowing users to enter their usernames and passwords which is getting stored in a sheet called "LOG SHEET" for future use.

    All that works fine, however I am now stuck on the Login part.

    I presume that it would work better if I created a ComboBox to draw the information from "LOG SHEET" Range A1:A56
    Thereafter users could select their username from the list and just enter the password and if it matches then the "MAIN SCREEN" will pop up for them to continue.

    All of this sounded quiet cool in my head until I started developing it.

    I now require a VBA code that will allow me to populate the information from LOG SHEET A1:A56 into the ComboBox.

    Alternatively I could create a user form similar to that of the "register" and allow users to enter their usernames and passwords.

    if it matches then they will be granted access into the MAIN SCREEN. (I believe this should work better)

    With this option I would like a code that, when a username is entered the password entered must match to the one that they have previously entered upon registration.

    Eg. if the Username which is Apples happens to be stored in cell A1 and the password registered on that username is stored in cell B1 and if the user (Apples) entered a password which does not match that of B1 an "Access denied error" must show up. (Even if the password matches that of any other cell access must be denied)

    I apologize for the long post.

    All responses will be greatly appreciated

  2. #2
    Forum Contributor lancer102rus's Avatar
    Join Date
    04-02-2014
    Location
    Ufa
    MS-Off Ver
    Excel 2010, 2013
    Posts
    252

    Re: Username and Password Login Dilemma

    usernames in listbox:
    1) select log sheet and open Name manager (Ctrl+F3)
    2) Click button New
    3) give the name e.g. "usernames"
    4) set "refers to" "=OFFSET('LOG SHEET'!$A$1,0,0,COUNTA('LOG SHEET'!$A:$A),1)"
    5) press OK and close Name manager
    6) open the properties of ComboBox
    7) in parameter RowSource write name given in step #3
    Profit!

+ 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. Please help Excel VBA Code to Login Remote Desktop with Username & Password
    By sram24860 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-03-2014, 03:14 AM
  2. Username/Password Login userform code
    By Nitefox in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-17-2014, 02:43 PM
  3. username and password login
    By dc123 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-17-2013, 08:38 AM
  4. Username and Password login in MS Excel 2010
    By beseda2004 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-03-2011, 03:45 PM
  5. Login Design Dilemma in Excel
    By LordMarcus in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-01-2009, 02:39 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