XL7: Macro Recorded to Add Sheet Template IncorrectLast reviewed: September 2, 1997Article ID: Q139575 |
The information in this article applies to:
SYMPTOMSWhen you record a Visual Basic for applications macro that adds a sheet template to a Microsoft Excel version 7.0 workbook, you will get a line of code similar to the following:
Sheets.Add Type:= "C:\MSOFFICE\TEMPLATES\SHEET.XLT"When you run this code, you receive the following error message:
Run-Time Error '1004' Add method of sheets class failed CAUSEThe value for the Type argument must be a Microsoft Excel sheet constant. The sheet constants are as follows:
xlWorksheet xlChart xlModule xlDialogSheet xlExcel4MacroSheet xlExcel4IntlMacroSheet WORKAROUNDTo work around this problem, use the following steps:
STATUSMicrosoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
|
Additional query words: 7.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |