Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub cmdLogin_Click()
- Print Encrypt(txtUsername1.Text, 14)
- Dim username As String
- Dim Password As String
- Dim found As Boolean
- found = False
- Open "M:\Computing\VB\users.dat" For Input As #1
- Do While Not EOF(1) And found = False
- Input #1, username, Password
- If username = txtUsername1.Text And Decrypt(Password, 14) = txtPassword1.Text Then
- 'match
- found = True
- End If
- Loop
- Close #1
- If found = True Then
- Me.Hide
- frmCPanel.Show
- ElseIf found = False Then
- MsgBox "Incorrect Username/Password"
- txtPassword1 = ""
- txtUsername1.SetFocus
- End If
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement