Thread
:
Add sheet to end
View Single Post
#
2
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
Add sheet to end
Worksheets.Add after:=Worksheets(Worksheets.C*ount)
--
Don Guillett
SalesAid Software
"Patti" wrote in message
...
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
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]