Copying one tab to another

E

Ed Davis

I am using the following in a button macro.

Sub Button1_Click()
ActiveWorkbook.Worksheets.Add.Name = Range("B10").Value
End Sub

I would now like to copy the whole tab from the original sheet to the new
tab created with the above macro.
Can anyone help me to do this.

Thanks in advance
Ed Davis
 
D

Don Guillett

Perhaps you should have stayed in the original thread where I answered your
first question. Instead of makin a sheet, naming it, copying data, why not
just copy the sheet and name it.

Sub COPYsheetandname()
ActiveSheet.Copy After:=Sheets(Sheets.Count)
ActiveSheet.Name = Range("b10")
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