copy hidden sheet data

A

Atiq

I have a macro to copy and past data from one sheet to another. It works fine
when I have all the sheets open, but when I hide the source sheet (where my
raw data is stored) macro gives me an error (400). Below is the code:

Sheets("Temp").Select
Range("A1") = "Gas"

Sheets("Nlist").Select
Range("A7").Select
Selection.Copy
Sheets("Temp").Select
Range("A2").Select
ActiveSheet.Paste


I want my raw data sheet
hidden ("Temp" sheet is always visible, and "Nlist" is the one I want to
Hide), what can I do to keep my macro working when raw data sheet is hidden?
Please advise....

Thanks!
 
J

Jim Thomlinson

Sheets("Temp").Range("A1") = "Gas"
Sheets("Nlist").Range("A7").Copy Sheets("Temp").Range("A2")
 

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

Similar Threads


Top