subscript out of range error: tring to copy a hidden sheet

S

sam

I got a subscript out of range error when trying to copy sheet2. Sheet2 is
hidden.

here is the code:

Worksheets("Hidden").Copy Worksheets("Sheet2")

Thanks in advance
 
D

Don Guillett

Sub copyhiddensht()
Sheets("Sheet2").Copy after:=Sheets(Sheets.Count)
ActiveSheet.Name = "newsht"
End Sub
 

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

Top