Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Autofilter Lists across Multiple Sheets, Maintain Correct Referenc EDSTAFF Excel Worksheet Functions 0 November 14th 05 03:27 PM
copy data in one sheet to multiple sheets in same workbook BrianMultiLanguage Excel Worksheet Functions 4 July 27th 05 07:26 PM
How do i auto create multiple files from 1 with multiple sheets Kathy Excel Worksheet Functions 0 July 26th 05 01:23 AM
How can I create multiple rows of worksheet tabs in a workbook? kdzugan Excel Discussion (Misc queries) 1 March 8th 05 03:13 PM
how do i switch between multiple sheets in the same workbook (key. Catalin Excel Discussion (Misc queries) 3 December 16th 04 06:33 PM


All times are GMT +1. The time now is 12:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"