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
Bookmarks