+ Reply to Thread
Results 1 to 7 of 7

UserForm Button to Change Password for a User

  1. #1
    Forum Contributor
    Join Date
    07-07-2014
    Location
    ericbartha.com
    MS-Off Ver
    2016 Professional
    Posts
    126

    UserForm Button to Change Password for a User

    Hey everyone,

    Trying to get a "password change" UserForm 'submit' button to find the record with the correct user, and change the password based on the users new input. I (think I?) have everything working except for the password doesn't change. Any thoughts?

    Please Login or Register  to view this content.
    Updated to fix code tags.
    Last edited by ericbartha; 04-01-2015 at 03:00 AM. Reason: Fixed code tags

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,437

    Re: UserForm Button to Change Password for a User

    Check the logic on your code

    Please Login or Register  to view this content.
    It appears you simple exit the do loop if usename and old password match.
    You also change the password is new equals verify, regardless of username.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor
    Join Date
    07-07-2014
    Location
    ericbartha.com
    MS-Off Ver
    2016 Professional
    Posts
    126

    Re: UserForm Button to Change Password for a User

    Thanks Andy, I will take a look. It's been a long day

    The username is defined by a "login" userform when the workbook first opens which then locks in that user until the workbook is closed. Not worried about the username for this userform because of that.

    Thanks again, hopefully I can work this out.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,437

    Re: UserForm Button to Change Password for a User

    Hopefully the adjusted indenting of the code I posted will make it clear why the code is not functioning as you expect.

  5. #5
    Forum Contributor
    Join Date
    07-07-2014
    Location
    ericbartha.com
    MS-Off Ver
    2016 Professional
    Posts
    126

    Re: UserForm Button to Change Password for a User

    I am still new to VBA, so I am still not quite grasping it.

    My thought for exiting the Do Loop is because it is after the line:
    Please Login or Register  to view this content.
    which would mean (if the value for the cell were changed) the password would be changed and purpose of the userform's purpose would be complete. I do not think I understand the logic of VBA well enough to figure out why this just isn't so. Any literature or advice you could point me towards?

    Maybe I just need to go to bed! haha

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,437

    Re: UserForm Button to Change Password for a User

    Untested but should work,

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    07-07-2014
    Location
    ericbartha.com
    MS-Off Ver
    2016 Professional
    Posts
    126

    Re: UserForm Button to Change Password for a User

    Sure does work!

    Thank you very much sir. I will read through and compare carefully tomorrow. For now, bed time!

    Have a good day.

+ 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] Username and Password VBA with the ability for user to change the password
    By egemencoskun in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-24-2014, 05:02 AM
  2. [SOLVED] Ask for password if the user wants to use the update & delete buttons in a userform
    By MariaPap in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-30-2013, 12:35 PM
  3. How do we build multi users userform with individual user id & password
    By tvc.james in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-28-2012, 04:32 AM
  4. User Password On A Button - Encrypt Password
    By mab in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-05-2010, 08:10 AM
  5. [SOLVED] Userform in Excel with Remember Password and User id option or check button
    By abhay_547 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 09-17-2009, 10:38 PM

Tags for this Thread

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