Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi ng
using xl xp pro Recorded some code to add and rename worksheets to new wb Sub Xtract() Application.DisplayAlerts = False Workbooks.Add ChDir "C:\WINDOWS\Temp" With ActiveWorkbook ..SaveAs Filename:="C:\WINDOWS\Temp\my_Labor_Data.xls", _ FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False Sheets.Add Sheets("Sheet1").Select Sheets("Sheet1").Name = "schedule_dat" Sheets("Sheet2").Select Sheets("Sheet2").Name = "actual_dat" Sheets("Sheet3").Select Sheets("Sheet3").Name = "budget_dat" ..Close End With Application.DisplayAlerts = True End Sub ================================= Execution stops after sheet 2. wb now has 2 sheets with names as coded sheet 3 is highlighted by debugger unclear as to why --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Master Worksheets and Individual Worksheets | Excel Worksheet Functions | |||
How use info in Excel shared worksheets to create new worksheets | Excel Worksheet Functions | |||
How do i assign the ActiveWorkbook.Worksheets to a worksheets object? | Excel Worksheet Functions | |||
Assigning Cells in worksheets to other data in other worksheets. | Excel Discussion (Misc queries) | |||
Need code to protect worksheets - amount of worksheets varies | Excel Programming |