Employees Login and Signup Form Excel VBA Part 1

Posted by | January 18, 2021 | Excel

 

Private Sub CheckBox2_Click()

If Me.CheckBox2.Value = True Then

Me.PasBox.PasswordChar = “”

Else

Me.vrPassBox.PasswordChar = “*”

End If

End Sub

 

Private Sub CheckBox1_Click()

If Me.CheckBox1.Value = True Then

Me.vrPassBox.PasswordChar = “”

Else

Me.PasBox.PasswordChar = “*”

End If

 

End Sub

 

Private Sub cmdExit_Click()

Unload Me

End Sub

 

Private Sub cmdSave_Click()

 

Dim X As Long

Dim Y As Worksheet

 

Set Y = Sheet1

 

X = Y.Range(“A” & Rows.Count).End(xlUp).Row + 1

 

With Y

.Cells(X, 1).Value = TextBox2.Text

.Cells(X, 2).Value = NameBox.Text

.Cells(X, 3).Value = UID.Text

.Cells(X, 4).Value = DSG.Text

.Cells(X, 5).Value = UID.Text

.Cells(X, 6).Value = PasBox.Text

.Cells(X, 7).Value = vrPassBox.Text

End With

 

MsgBox “WELCOME YOU ARE OUR NEW MEMBER”, vbInformation

Unload Me

 

End Sub

 

 

Private Sub DSG_Change()

Dim Mrow As Integer

On Error Resume Next

Mrow = Application.WorksheetFunction.Match(CStr(Me.DSG), _

Sheet1.Range(“D:D”), 0)

If Mrow >= 1 Then

Me.DSG = “”

MsgBox “Sorry This Email ID Already Exisit”

End If

End Sub

 

 

Private Sub NameBox_Change()

 

On Error Resume Next

Me.NameBox = Format(StrConv(Me.NameBox, vbProperCase))

 

End Sub

 

Private Sub UID_Change()

Dim Mrow As Long

On Error Resume Next

Mrow = Application.WorksheetFunction.Match(Me.UID, _

Sheet1.Range(“B:B”), 0)

If Mrow >= 1 Then

Me.UID = “”

MsgBox “Sorry This Mobile No Already Exisit”

End If

End Sub

 

Private Sub UID_Change()

UID = UCase(Me.UID.Text)

Dim Mrow As Long

On Error Resume Next

Mrow = Application.WorksheetFunction.Match(Me.UID, _

Sheet1.Range(“E:E”), 0)

If Mrow >= 1 Then

Me.UID = “”

MsgBox “Sorry This Mobile No Already Exisit”

End If

End Sub

 

Private Sub PasBox_Exit(ByVal Cancel As MSForms.ReturnBoolean)

On Error Resume Next

If Me.PasBox = Me.vrPassBox And Me.vrPassBox <> “” Then

Me.Label6.Caption = “”

Me.cmdSave.Enabled = ture

Me.cmdSave.SetFocus

Else

Me.Label6.Caption = “Password Not Matching”

Me.cmdSave.Enabled = False

End If

End Sub

 

Private Sub UserForm_Initialize()

TextBox2 = Application.WorksheetFunction.Max(Sheet1.Range(“A:A”)) + 1

End Sub

 

Private Sub VrpassBox_Change()

On Error Resume Next

If Me.PasBox = Me.vrPassBox And Me.vrPassBox <> “” Then

Me.Label6.Caption = “”

Me.cmdSave.Enabled = True

Me.cmdSave.SetFocus

Else

Me.Label6.Caption = “Password Not Matching”

Me.cmdSave.Enabled = False

End If

End Sub

 

553 total views, 1 today

Tags: , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

WP2Social Auto Publish Powered By : XYZScripts.com