برای تغییر رمز عبور کاربران نیاز به راهنمای دارم
در فایل پیوست هر کاربر چطور میتونه رمز عبور خودش را تغییر بده
|
🖤 پیام تسلیتبا نهایت تأسف و تأثر، باخبر شدیم جناب آقای محمد محمدی با نام کاربری smartman ، از مدیران ارزشمند انجمن اکسل ایران، دار فانی را وداع گفتهاند. ایشان سالها با دانش، تجربه، اخلاق نیکو و روحیه کمک به دیگران، سهم بزرگی در رشد و پویایی انجمن داشتند و خاطره حضور ارزشمندشان همواره در ذهن اعضای انجمن باقی خواهد ماند. مدیریت و اعضای انجمن ExcelIran این ضایعه را به خانواده محترم ایشان، دوستان و تمامی اعضای انجمن تسلیت عرض نموده و از خداوند متعال برای آن مرحوم، رحمت و مغفرت الهی و برای بازماندگان صبر و شکیبایی مسئلت دارند.
انا لله و انا الیه راجعون
|
Private Sub CommandButton2_Click()
Dim Lastrow As Long
Lastrow = Cells(Rows.Count, "A").End(3).Row
If Val(TextBox2.Text) <> Val(TextBox3.Text) Then
MsgBox "تکرار رمز همخواني ندارند"
Exit Sub
End If
For Each cell In Range("a2:a" & Lastrow)
If cell.Value = Val(TextBox4.Text) And cell.Offset(0, 1) = Val(TextBox1.Text) Then
cell.Value = Val(TextBox4.Text)
cell.Offset(0, 1) = Val(TextBox2.Text)
Exit Sub
Else
MsgBox " رمز يا نام کاربري وارد شده صحيح نمي باشد"
End If
Exit Sub
Next
End Sub
Private Sub CommandButton2_Click()
Dim Lastrow As Long
Lastrow = Cells(Rows.Count, "A").End(3).Row
If Val(TextBox2.Text) <> Val(TextBox3.Text) Then
MsgBox "تکرار رمز همخواني ندارند"
Exit Sub
End If
For Each cell In Range("a2:a" & Lastrow)
If cell.Value = Val(TextBox4.Text) And cell.Offset(0, 1) = Val(TextBox1.Text) Then
cell.Value = Val(TextBox4.Text)
cell.Offset(0, 1) = Val(TextBox2.Text)
Exit Sub
Else
MsgBox " رمز يا نام کاربري وارد شده صحيح نمي باشد"
End If
Exit Sub
Next
End Sub
Private Sub CommandButton3_Click()
Dim Sh As Worksheet
Dim UserName As String
Dim Password As String
Dim Cell As Range
Dim c As Long
If Val(TextBox2.Text) <> Val(TextBox3.Text) Then
MsgBox "تکرار رمز همخواني ندارند"
Exit Sub
End If
UserName = Val(TextBox4.Text)
Password = Val(TextBox1.Text)
For Each Cell In Sheets("User List").Range("A2:A" & Sheets("User List").Range("A65536").End(xlUp).Row)
If UCase(Cell.Value) = UCase(UserName) And UCase(Cell.Offset(, 1).Value) = UCase(Password) Then
Cell.Value = Val(TextBox4.Text)
Cell.Offset(0, 1) = Val(TextBox2.Text)
MsgBox "تغيير رمز انجام شد"
Exit Sub
End If
Next Cell
MsgBox " رمز يا نام کاربري وارد شده صحيح نمي باشد"
Exit Sub
End Sub
Private Sub CommandButton3_Click()
Dim Sh As Worksheet
Dim UserName As String
Dim Password As String
Dim Cell As Range
Dim c As Long
If Val(TextBox2.Text) <> Val(TextBox3.Text) Then
MsgBox "تکرار رمز همخواني ندارند"
Exit Sub
End If
UserName = Val(TextBox4.Text)
Password = Val(TextBox1.Text)
For Each Cell In Sheets("User List").Range("A2:A" & Sheets("User List").Range("A65536").End(xlUp).Row)
If UCase(Cell.Value) = UCase(UserName) And UCase(Cell.Offset(, 1).Value) = UCase(Password) Then
Cell.Value = Val(TextBox4.Text)
Cell.Offset(0, 1) = Val(TextBox2.Text)
MsgBox "تغيير رمز انجام شد"
Exit Sub
End If
Next Cell
MsgBox " رمز يا نام کاربري وارد شده صحيح نمي باشد"
Exit Sub
End Sub
Private Sub CommandButton2_Click()
Dim UserName As String
Dim Password As String
Dim Cell As Range
If Val(TextBox2.Text) <> Val(TextBox3.Text) Then
MsgBox "تکرار رمز همخواني ندارند"
Exit Sub
End If
UserName = Val(TextBox4.Text)
Password = Val(TextBox1.Text)
' نام شيت پسوردها ("User List") کد
For Each Cell In Sheets("User List").Range("A2:A" & Sheets("User List").Range("A65536").End(xlUp).Row)
If UCase(Cell.Offset(, 1).Value) = UCase(Password) Then
Cell.Offset(0, 1) = Val(TextBox2.Text)
MsgBox "تغيير رمز انجام شد"
Exit Sub
End If
Next Cell
MsgBox " رمز يا نام کاربري وارد شده صحيح نمي باشد"
Exit Sub
End Sub
Private Sub CommandButton2_Click()
Dim UserName As String
Dim Password As String
Dim Cell As Range
If Val(TextBox2.Text) <> Val(TextBox3.Text) Then
MsgBox "تکرار رمز همخواني ندارند"
Exit Sub
End If
UserName = Val(TextBox4.Text)
Password = Val(TextBox1.Text)
' نام شيت پسوردها ("User List") کد
For Each Cell In Sheets("User List").Range("A2:A" & Sheets("User List").Range("A65536").End(xlUp).Row)
If UCase(Cell.Offset(, 1).Value) = UCase(Password) Then
Cell.Offset(0, 1) = Val(TextBox2.Text)
MsgBox "تغيير رمز انجام شد"
Exit Sub
End If
Next Cell
MsgBox " رمز يا نام کاربري وارد شده صحيح نمي باشد"
Exit Sub
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim lCount As Long
If Target.Cells.Count > 1 Then Exit Sub
On Error Resume Next
If Not Intersect(Target, Range("C1:C5")) Is Nothing Then
For lCount = 1 To Sheets.Count
If Sheets(lCount).Name <> Me.Name Then
Sheets(lCount).Name = Me.Cells(lCount, "C")
End If
Next lCount
End If
End Sub
Private Sub CommandButton1_Click()
Dim Sh As Worksheet
Dim UserName As String
Dim Password As String
Dim Cell As Range
Dim c As Long
If Val(TextBox2.Text) <> Val(TextBox3.Text) Then
MsgBox "تکرار رمز همخواني ندارند"
Exit Sub
End If
UserName = TextBox4.Text
Password = Val(TextBox1.Text)
For Each Cell In Sheets("User List").Range("A2:A" & Sheets("User List").Range("A65536").End(xlUp).Row)
If UCase(Cell.Offset(, 2).Value) = UCase(UserName) And UCase(Cell.Offset(, 1).Value) = UCase(Password) Then
' Cell.Value = Val(TextBox4.Text)
Cell.Offset(0, 1) = Val(TextBox2.Text)
MsgBox "تغيير رمز انجام شد"
Exit Sub
End If
Next Cell
MsgBox " رمز يا نام کاربري وارد شده صحيح نمي باشد"
Exit Sub
End Sub
Private Sub UserForm_Activate() TextBox4.Text = ActiveSheet.Name End Sub
Private Sub CommandButton1_Click()
Dim Sh As Worksheet
Dim UserName As String
Dim Password As String
Dim Cell As Range
Dim c As Long
If Val(TextBox2.Text) <> Val(TextBox3.Text) Then
MsgBox "تکرار رمز همخواني ندارند"
Exit Sub
End If
UserName = TextBox4.Text
Password = Val(TextBox1.Text)
For Each Cell In Sheets("User List").Range("A2:A" & Sheets("User List").Range("A65536").End(xlUp).Row)
If UCase(Cell.Offset(, 2).Value) = UCase(UserName) And UCase(Cell.Offset(, 1).Value) = UCase(Password) Then
' Cell.Value = Val(TextBox4.Text)
Cell.Offset(0, 1) = Val(TextBox2.Text)
MsgBox "تغيير رمز انجام شد"
Exit Sub
End If
Next Cell
MsgBox " رمز يا نام کاربري وارد شده صحيح نمي باشد"
Exit Sub
End Sub
Private Sub UserForm_Activate() TextBox4.Text = ActiveSheet.Name End Sub
Private Sub CommandButton1_Click()
Dim Sh As Worksheet
Dim UserName As String
Dim Password As String
Dim Cell As Range
Dim c As Long
If Val(TextBox2.Text) <> Val(TextBox3.Text) Then
MsgBox "تکرار رمز همخواني ندارند"
Exit Sub
End If
'UserName = TextBox4.Text
UserName = ActiveSheet.Name
Password = Val(TextBox1.Text)
For Each Cell In Sheets("User List").Range("A2:A" & Sheets("User List").Range("A65536").End(xlUp).Row)
If UCase(Cell.Offset(, 2).Value) = UCase(UserName) And UCase(Cell.Offset(, 1).Value) = UCase(Password) Then
' Cell.Value = Val(TextBox4.Text)
Cell.Offset(0, 1) = Val(TextBox2.Text)
MsgBox "تغيير رمز انجام شد"
Exit Sub
End If
Next Cell
MsgBox " رمز يا نام کاربري وارد شده صحيح نمي باشد"
Exit Sub
End Sub
Private Sub CommandButton1_Click()
'Variant
Dim Sh As Worksheet
Dim UserName As String
Dim Password As String
Dim Cell As Range
Dim c As Long
If Val(TextBox2.Text) <> Val(TextBox3.Text) Then
MsgBox "تکرار رمز همخواني ندارند"
Exit Sub
End If
'UserName = TextBox4.Text
UserName = ActiveSheet.Name
Password = CStr(TextBox1.Text)
For Each Cell In Sheets("User List").Range("A2:A" & Sheets("User List").Range("A65536").End(xlUp).Row)
If UCase(Cell.Offset(, 2).Value) = UCase(UserName) And UCase(Cell.Offset(, 1).Value) = UCase(Password) Then
' Cell.Value = Val(TextBox4.Text)
Cell.Offset(0, 1) = CStr(TextBox2.Text)
MsgBox "تغيير رمز انجام شد"
Exit Sub
End If
Next Cell
MsgBox " رمز يا نام کاربري وارد شده صحيح نمي باشد"
Exit Sub
End Sub
Private Sub CommandButton1_Click()
'Variant
Dim Sh As Worksheet
Dim UserName As String
Dim Password As String
Dim Cell As Range
Dim c As Long
If Val(TextBox2.Text) <> Val(TextBox3.Text) Then
MsgBox "تکرار رمز همخواني ندارند"
Exit Sub
End If
'UserName = TextBox4.Text
UserName = ActiveSheet.Name
Password = CStr(TextBox1.Text)
For Each Cell In Sheets("User List").Range("A2:A" & Sheets("User List").Range("A65536").End(xlUp).Row)
If UCase(Cell.Offset(, 2).Value) = UCase(UserName) And UCase(Cell.Offset(, 1).Value) = UCase(Password) Then
' Cell.Value = Val(TextBox4.Text)
Cell.Offset(0, 1) = CStr(TextBox2.Text)
MsgBox "تغيير رمز انجام شد"
Exit Sub
End If
Next Cell
MsgBox " رمز يا نام کاربري وارد شده صحيح نمي باشد"
Exit Sub
End Sub
If UCase(Cell.Offset(, 2).Value) = UCase(UserName) And UCase(Cell.Offset(, 1).Value) = UCase(Password) Then
کامنت