View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Patti Patti is offline
external usenet poster
 
Posts: 45
Default Add sheet to end

Hello. How do I get this to add the new sheet to the end of my workbook:

Sub CopyRange()

Dim wsMain As Worksheet, wsNew As Worksheet

Set wsMain = Sheets("test")
Set wsNew = Sheets.Add
wsMain.Range("A:B").Copy wsNew.Range("A1")
wsNew.Name = InputBox("Enter New Worksheet Name")

End Sub

Thanks,

Patti