Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In Excel 2003, the documentation for Worksheets.Add suggests that I can use
the Type parameter to specify a path to a template for an added worksheet. This works with Sheets.Add, but produces a 1004 run-time error with Worksheets.Add Although the workaround is simple, the on-line help ought to be changed. The following code will demonstrate the error in Excel 97, 2000, 2002 and 2003: Sub NewSheet() 'This statement produces Run-time error 1004, Method 'Add' of object 'Sheets' failed Worksheets.Add Type:="C:\VBA\Temp\Sheet1.xlt" Sheets.Add Type:="C:\VBA\Temp\Sheet1.xlt" 'This statement works End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Adding additional worksheets to an existing template | Excel Discussion (Misc queries) | |||
How do use a template for different worksheets in workbook | Excel Worksheet Functions | |||
How do I import and filter worksheets into a template? | Excel Discussion (Misc queries) | |||
New Worksheets in a template to be pre-formatted. | Excel Worksheet Functions | |||
Paste data repeatedly from different worksheets to a template | Excel Worksheet Functions |