Vba Login and Change password

Xlacs

Board Regular
Joined
Mar 31, 2021
Messages
105
Office Version
  1. 2016
Platform
  1. Windows
Hello Good People,

I' currently needing an assistance of the expert in this field. I came a cross this simple problem basically, its just a simple login system. However, I'm getting lost with the below code.. What I wanted to achieve is that, may textbox1 value is auto populated based on the username Environ("Username"). If textbox1 and textbox2 value matched my roster sheet then it will successfully login.. Also, my other code is for change password but I'm nowhere near it. 😔


VBA Code:
dim log As Worksheet
Dim rng As Range

Set log = Sheets("Roster")
Set rng = log.range("c2:c67"). Find(me.textbox2.value)
Unload login
Staff.show

Else

Mgsbox "no user found."

Exit sub

End if

End Sub/CODE]

change password code for another userform

[CODE=vba]Sheet("roster x, "C").value = textbox2.value
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hi
If you are that stuck always worth taking a look at what others have done & see if you can adapt to meet your own project need.

One example that may help you: excel-userform-login

But there probably are others you can search for - you can always post back if need further assistance.

Hope Helpful

Dave
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,718
Members
448,986
Latest member
andreguerra

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top