View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Leith Ross[_2_] Leith Ross[_2_] is offline
external usenet poster
 
Posts: 128
Default Macro to create a new worksheet that is a copy of an existing one?

On Jul 2, 4:40 pm, Kai Cunningham
wrote:
I have created a button that I want to assign a macro to that will take the
information in a cell and make it the name of a new worksheet. This
worksheet needs to be a copy of an existing worksheet (#2 in position in the
line of worksheets currently) but with the name the user enters in the box
provided. Any suggestions?
-Kai


Hello Kal,

This macro use the value in cell A1 to rename the second worksheet (#2
in position).

Sub RenameSheet()
Worksheets(2).Name = ActiveSheet.Range("A1").Name
End Sub

Sincerely,
Leith Ross