XL5: Can't Insert Sheet Based on Template with Hidden SheetLast reviewed: February 2, 1998Article ID: Q128192 |
The information in this article applies to:
SYMPTOMSIn Microsoft Excel, when you insert a new sheet based on a template using the Sheet tab shortcut menu, if the template contains a hidden sheet, one of the following occurs:
Microsoft Excel for Windows --------------------------- You receive a general protection (GP) fault. Microsoft Excel for the Macintosh --------------------------------- You receive the following error message: Sorry, a system error occurred. "Microsoft Excel" error type 11 CAUSEThis behavior occurs if the hidden sheet is the last sheet in the template file, and the sheet was hidden using the xlveryhidden constant in a Visual Basic procedure. For example, if you create a template file, BOOK1.XLT, that contains the sheets Sheet1 and Sheet2, where Sheet2 is the last sheet in the workbook, and you hide Sheet2 using the following command
Sheets("Sheet2").Visible = xlveryhiddenMicrosoft Excel stops responding (hangs) when you insert a sheet based on this template in any workbook file.
WORKAROUNDSTo work around this problem, use any of the following methods.
Method 1When you create a template that you are going to use to insert a new sheet in another workbook, make sure that none of the sheets in the template file are hidden.
Method 2Open the template that contains the sheets that you want to insert. You can then move or copy individual sheets from the template file to your workbook, or from your workbook to the template file. Note that if you hide any of the sheets in the template file by choosing Sheet from the Format menu, and then choosing Hide, or by setting the Visible property of the sheet to False, Microsoft Excel does not hang when you insert a sheet based on this template; however, none of the sheets in the template are inserted in this case. For additional information, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q127944 TITLE : XL5: Sheet Based on Template With Hidden Sheet Not Inserted MORE INFORMATIONYou can set the Visible property of a sheet to xlveryhidden to hide the object so that it can only be made visible again by setting the Visible property to True. That is, the sheet cannot be made visible by choosing Sheet from the Format menu, and then choosing Unhide. Note that this property can be set for a chart, dialog sheet, module or worksheet.
REFERENCESFor more information about Creating An Autotemplate For New Sheets, choose the Search button in Help and type:
templates, creatingFor more information about the Visible property, choose the Search button in Visual Basic Help and type:
visible property |
Additional query words: 5.00 5.00a5.00c gpf crash lock up freeze
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |