+ Reply to Thread
Results 1 to 22 of 22

Match Combobox with textbox then enable password: HOW TO?

  1. #1
    Registered User
    Join Date
    03-01-2018
    Location
    Philippines
    MS-Off Ver
    2003,2007,2010,2013 and 2016
    Posts
    51

    Post Match Combobox with textbox then enable password: HOW TO?

    Hello everyone.

    I have been trying to look for working codes for the userform to work flawlessly. Unfortunately, I couldn't find any code. I just wish you could help me how to do this. I have a sheet named "DATABASE" with names of schools in column A, school ID in column B, and password in column C.

    The combobox (cboStation) is populated already with the list of schools. What I need to do now is when a user select a specific school from the cboStation, the user can input the corresponding school id in the Textbox1. When Textbox1 matches with the selection in the cboStation, the password will be enabled. This means that when cboStation and Textbox1 don't match, the password area is disabled.

    Below are the codes within the userform:

    Please Login or Register  to view this content.
    Attached Images Attached Images
    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: Match Combobox with textbox then enable password: HOW TO?

    Hello poizones,

    Why does the user need to input the school id once the school is chosen from the combo box? This field can be added automatically once the school has been selected. The user then only needs to enter the password.
    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
    03-01-2018
    Location
    Philippines
    MS-Off Ver
    2003,2007,2010,2013 and 2016
    Posts
    51

    Re: Match Combobox with textbox then enable password: HOW TO?

    Hi Leith,

    The school id serves as their username. If it matches with the name of the school, the password box will be enabled and the user can have access in putting his/her password. Each user who is assigned to specific school will be provided with his/her respective password.

    I hope that this is clear.

    Thanks.

  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: Match Combobox with textbox then enable password: HOW TO?

    Hello poizones,

    Okay, I understand now.

  5. #5
    Registered User
    Join Date
    03-01-2018
    Location
    Philippines
    MS-Off Ver
    2003,2007,2010,2013 and 2016
    Posts
    51

    Re: Match Combobox with textbox then enable password: HOW TO?

    Leith,

    I hope someone from this forum could extend a help. MORE POWER to all.

    Thanks.

  6. #6
    Forum Contributor
    Join Date
    10-01-2018
    Location
    Virginia Beach, VA
    MS-Off Ver
    365
    Posts
    129

    Re: Match Combobox with textbox then enable password: HOW TO?

    I'm still confused by what you're trying to do...

    So, step 1, user selects a school in the combobox.

    Step 2, user enters the school ID. Are there multiple school IDs for each school, like one for each student? Can the same school ID be associated with more than one school, like if the same student takes classes at two different schools?

    Step 3, if school ID matches the school, password field is "enabled"... does this mean that the password on your database list gets shown automatically in the textbox, or does this mean that the user can only enter a password if the school ID matches the school, and then the password entered will be compared to the password in the database to see if it is a match?

  7. #7
    Registered User
    Join Date
    03-01-2018
    Location
    Philippines
    MS-Off Ver
    2003,2007,2010,2013 and 2016
    Posts
    51

    Re: Match Combobox with textbox then enable password: HOW TO?

    This is how it should work.

    Step 1. User selects a school in the combobox.

    Step 2. User enters the correct school id which matches the selected school from step 1. Each school has it own unique school id. No duplicate school id is provided to other schools.

    Step 3. If the school id matches with the school in the combobox, a password field is enabled. The user then input his/her password to login (can have access to a specific sheet within the workbook). The password should also match to the provided password within the database.

  8. #8
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,256

    Re: Match Combobox with textbox then enable password: HOW TO?

    perhab like this in workbook open
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by daboho; 11-08-2018 at 12:45 AM.
    "ThankyouFor Attention * And Your Help!!"

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Match Combobox with textbox then enable password: HOW TO?

    Assuming you have 1 x ComboBox (cboStation) & 2 TextBox (TextBox1 & 2).
    ID should be entered in TextBox1, and TextBox 2 for password entry.
    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    03-01-2018
    Location
    Philippines
    MS-Off Ver
    2003,2007,2010,2013 and 2016
    Posts
    51

    Re: Match Combobox with textbox then enable password: HOW TO?

    jindon,

    The codes you have provided was great. But I don't know how to integrate this one to LOGIN button. Anymore suggestion?

    Thank you.

  11. #11
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Match Combobox with textbox then enable password: HOW TO?

    If you upload your workbook with the USERFORM, I can do it. otherwise too much GUESS work...

  12. #12
    Registered User
    Join Date
    03-01-2018
    Location
    Philippines
    MS-Off Ver
    2003,2007,2010,2013 and 2016
    Posts
    51

    Re: Match Combobox with textbox then enable password: HOW TO?

    jindon,

    Kindly check the attached file.

    Thanks.
    Attached Files Attached Files

  13. #13
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Match Combobox with textbox then enable password: HOW TO?

    I don't understand after "LOG ON" click though...
    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    03-01-2018
    Location
    Philippines
    MS-Off Ver
    2003,2007,2010,2013 and 2016
    Posts
    51

    Re: Match Combobox with textbox then enable password: HOW TO?

    jindon,

    Sorry for not so specific.

    Data for login:
    Amalao Elementary School 120071 AES120071

    The cancel button will close the entire workbook.
    Once logon successful, the user will be taken to LOGON SHEET.

    Refer to this.
    Attached Files Attached Files

  15. #15
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Match Combobox with textbox then enable password: HOW TO?

    1) Change Cancel button code to
    Please Login or Register  to view this content.
    2) Add following code to the module.
    Please Login or Register  to view this content.

  16. #16
    Registered User
    Join Date
    03-01-2018
    Location
    Philippines
    MS-Off Ver
    2003,2007,2010,2013 and 2016
    Posts
    51

    Re: Match Combobox with textbox then enable password: HOW TO?

    Thank you!

    But there is one more thing I need if it would be okay. The user can only access its own worksheet after clicking LOGIN.
    Attached Files Attached Files

  17. #17
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Match Combobox with textbox then enable password: HOW TO?

    If you have another query, you should sate everything.

    Asking one by one is not good.

  18. #18
    Registered User
    Join Date
    03-01-2018
    Location
    Philippines
    MS-Off Ver
    2003,2007,2010,2013 and 2016
    Posts
    51

    Re: Match Combobox with textbox then enable password: HOW TO?

    Sorry! and thank you.

  19. #19
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Match Combobox with textbox then enable password: HOW TO?

    Deleted....................
    Last edited by jindon; 11-08-2018 at 03:29 AM.

  20. #20
    Registered User
    Join Date
    03-01-2018
    Location
    Philippines
    MS-Off Ver
    2003,2007,2010,2013 and 2016
    Posts
    51

    Re: Match Combobox with textbox then enable password: HOW TO?

    jindon,

    It is assumed that all worksheets are available. Otherwise, a message will prompt "The worksheet is unavailable right now. Please contact the system administrator. Thank you." then the application will quit.

  21. #21
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Match Combobox with textbox then enable password: HOW TO?

    Don't worry, you opened a new thread, so continue there, someone will help you.

  22. #22
    Registered User
    Join Date
    03-01-2018
    Location
    Philippines
    MS-Off Ver
    2003,2007,2010,2013 and 2016
    Posts
    51

    Re: Match Combobox with textbox then enable password: HOW TO?

    Does anyone here has the solution for this?

    I am stuck here.
    Last edited by poizones; 11-08-2018 at 04:21 AM.

+ 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] Userform Combobox for Username and textbox password
    By maroguy69 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-20-2017, 08:59 AM
  2. [SOLVED] enable/disable combobox based on textbox entry
    By bqheng in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-05-2017, 11:53 AM
  3. VBA Macro to enable Save option without a password but enable Save As with password
    By WuonAlice in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-19-2016, 12:54 PM
  4. Replies: 0
    Last Post: 08-18-2015, 04:13 PM
  5. Combobox enable textbox
    By jpernice in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-24-2015, 09:16 PM
  6. [SOLVED] Vba vlookup & match value in combobox and textbox on a userform
    By kboy1289 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 12-13-2013, 03:24 PM

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