In this video, we'll learn how to create a login form in Microsoft Excel using VBA. We'll show you how to create a user login form with a show and hide password textbox. This tutorial is useful if you need to create a login form for your website or application.
If you're a Microsoft Excel user, then this video is for you! In this video, we'll show you how to create a user login form using VBA. We'll show you how to create a user login form with a show and hide password textbox. This tutorial is useful if you need to create a login form for your website or application. So make sure to watch the video and learn how to create a login form with
Subscribe to my channel to find everyday new information in programming and Computerr Science
Subscribe to @programmingforeverybody
https://www.youtube.com/@programmingforeverybody/?sub_confirmation=1
Source Code:
Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
passtxt.PasswordChar = ""
Else
passtxt.PasswordChar = "*"
End If
End Sub
Private Sub CommandButton1_Click()
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("Sheet2")
Dim i As Integer
For i = 1 To ws.UsedRange.Rows.Count
If usertxt.Value = ws.Cells(i, 1).Value And passtxt.Value = ws.Cells(i, 2).Value Then
UserForm1.lbl_user.Caption = Me.usertxt.Value
Unload Me
UserForm1.Show
Exit Sub
End If
Next
MsgBox ("Error username or password")
End Sub
No comments:
Post a Comment