lovejanu4u
New Member
- Joined
- Apr 29, 2019
- Messages
- 36
Source Code:
Private Sub CommandButton1_Click()
If TextBox1.Text = Sheets("Admin").Range("E4") Then
If TextBox2.Text = Sheets("Admin").Range("f4") Then
MsgBox "xxxxx now you can access the file"
Application.Visible = True
ActiveWorkbook.Unprotect ("20051982")
Sheets("Emp Status").Visible = True
Sheets("Emp Data").Visible = False
ActiveWorkbook.Protect Password:="20051982"
Unload Me
Else
MsgBox "Check Your Username or Password"
End If
End If
End Sub
Desitnation:
Sub Button5_Click()
Sheets("EMP Data").Select
Range("A1:AS1500").Select
Selection.Copy
Sheets("Information Data").Select
Range("A4").Select
ActiveSheet.Paste
End Sub
Note: I need code to copy from ("EMP Data") to paste destination sheets("Information Data"). I added restriction for the users but I want user to check the copy of information.
Private Sub CommandButton1_Click()
If TextBox1.Text = Sheets("Admin").Range("E4") Then
If TextBox2.Text = Sheets("Admin").Range("f4") Then
MsgBox "xxxxx now you can access the file"
Application.Visible = True
ActiveWorkbook.Unprotect ("20051982")
Sheets("Emp Status").Visible = True
Sheets("Emp Data").Visible = False
ActiveWorkbook.Protect Password:="20051982"
Unload Me
Else
MsgBox "Check Your Username or Password"
End If
End If
End Sub
Desitnation:
Sub Button5_Click()
Sheets("EMP Data").Select
Range("A1:AS1500").Select
Selection.Copy
Sheets("Information Data").Select
Range("A4").Select
ActiveSheet.Paste
End Sub
Note: I need code to copy from ("EMP Data") to paste destination sheets("Information Data"). I added restriction for the users but I want user to check the copy of information.