Copy Sheet

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

Hi to all
What modification must be made to copy before when the sheet is hidden.
Example
..Copy Before:=Worksheets("Data") where DATA! is hidden. The copy ends up
after DATA rather than before.

Thanks
 
Try making it visible before and hide it after

Worksheets("Data") .Visible = xlSheetVisible
....

Worksheets("Data") .Visible = xlSheetHidden

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Hi Steve,
What modification must be made to copy before when the sheet is hidden.
Example
.Copy Before:=Worksheets("Data") where DATA! is hidden. The copy ends up
after DATA rather than before.

Try this:

Worksheets("Sheet1").Copy After:=Worksheets("Data")
Worksheets("Data").Move After:=ActiveSheet

--
Regards

Melanie Breden
- Microsoft MVP für Excel -

http://excel.codebooks.de (Das Excel-VBA Codebook)
 

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