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.
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