Is it possible to Copy From or Paste To a hidden sheet?

  • Thread starter Thread starter Tom Joseph
  • Start date Start date
T

Tom Joseph

Is this possible?

If so, I would appreciate a bit of example code.

I greatly appreciate any help.

Best regards,

Tom
 
Copy from hidden sheet
=======================
Worksheets("Hidden").Range("A1:E5").Copy Worksheets("Sheet1").Range("A1")

Copy to hidden sheet
=======================
Worksheets("Sheet1").Range("A1:E5").Copy Worksheets("Hidden").Range("A1")

Adjust your sheet names, copy ranges and destination upper left destination
cell as appropriate for your setup.
 
Here is the code.....

Assume you are in sheet2 and run the macro.
hide sheet1 and put some value in Cell A1 of sheet1
It will work fine.

Sub Macro4()
'
ActiveCell.Value = Sheets("Sheet1").Range("A1").Value
Sheets("Sheet1").Range("A2").Value = 500

End Sub
 
By the way, you should note that it is not necessary to do a 2-step
operation (copy first then paste).... you can simply copy to your
destination directly.
 
Hi Rick,

This worked fine.
Worksheets("Hidden").Range("A1:E5").Copy Worksheets("Sheet1").Range("A1")

Instead of "A1:E5" I want to copy the entire sheet and also paste it as
values.

Can you help with this?

Thanks.
 
Try this statement...

Worksheets("Hidden").Cells.Copy Worksheets("Sheet1").Range("A1")

Remember to change the destination worksheet name if necessary.
 
Thanks, Rick.

Rick Rothstein said:
Try this statement...

Worksheets("Hidden").Cells.Copy Worksheets("Sheet1").Range("A1")

Remember to change the destination worksheet name if necessary.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top