How I Can copy data from the VBA coded hidden sheet without making it visible first? Please Help anyone if can

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.





 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Forum statistics

Threads
1,214,979
Messages
6,122,559
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top