Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to create workbook with multiple sheets
I need to copy a certain sheet in my workbook a number of times to a
new workbook, I can do this with this code to a point i get errors, sort of new to excel macros. not sure how to place the saveworkbook command (without it i can copy multiple sheets(according to list) in the same workbook, but i need to create a new workbook with the multiple worksheet copies. Private Sub CommandButton1_Click() With Worksheets("START") For Each cell In .Range(.Cells(1, 1), .Cells(Rows.Count, 1).End(xlUp)) If Not IsEmpty(cell) Then Worksheets("template").Copy After:=Worksheets(Worksheets.Count) ActiveSheet.Name = cell.Value End If Next End With ActiveWorkbook.SaveAs Filename:="NewFile.xls", _ FileFormat:=xlNormal End Sub any hints. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Autofilter Lists across Multiple Sheets, Maintain Correct Referenc | Excel Worksheet Functions | |||
copy data in one sheet to multiple sheets in same workbook | Excel Worksheet Functions | |||
How do i auto create multiple files from 1 with multiple sheets | Excel Worksheet Functions | |||
How can I create multiple rows of worksheet tabs in a workbook? | Excel Discussion (Misc queries) | |||
how do i switch between multiple sheets in the same workbook (key. | Excel Discussion (Misc queries) |