Copy a Sheet

G

Guest

I am trying to use the following code to copy a master sheet after the last
sheet in the workbook.

Sheets("master").Select
Sheets("master").Copy After:=Sheets(6)

The last part of the above is giving me the trouble. What should the After:=
statement be?
 
J

Jef Gorbach

Judd Jones said:
I am trying to use the following code to copy a master sheet after the last
sheet in the workbook.

Sheets("master").Select
Sheets("master").Copy After:=Sheets(6)

The last part of the above is giving me the trouble. What should the After:=
statement be?

Sheets("Master").Copy After:=Sheets(Sheets.Count) 'copy it
Sheets(Sheets.Count).Name = "Master-2" 'rename it
something useful
 

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