Copy sheets.

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

Tom

Hello,

how can I copy sheets in same workbook and set immedietly new name for this
"copy" by one instruction.
When I used Sheets("test").Copy excel automaticly generate "test (2)" or
"test (3)", this I dont need.

thanks Tom
 
There is a way to beat this.

If you have observed, when you copy a sheet, the newly created sheet is
active.

after copy, you can immediately use activesheet.name = "your_name" then
you can control this.

Sub copy_sheet()

Sheets("Sheet1").Copy After:=Sheets(1)
ActiveSheet.Name = "Newname"

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

Back
Top