Microsoft KB Archive/109417

= Microsoft Knowledge Base =

XL5: Cannot Replace Default Module with Autotemplate
Last reviewed: September 12, 1996

Article ID: Q109417

The information in this article applies to:

- Microsoft Excel for Windows, versions 5.0, 5.0c - Microsoft Excel for the Macintosh, versions 5.0, 5.0a

SUMMARY
In Microsoft Excel version 5.0 it is not possible to replace the default Visual Basic module with an autotemplate called MODULE.XLT. It is possible to replace all of the other types of sheets (worksheets, chart sheets, dialog sheets, and Microsoft Excel 4.0 macro sheets) with autotemplates.

If you save an autotemplate called MODULE.XLT to the EXCEL\XLSTART directory, the word "Module" will appear twice in the Insert dialog box.

MORE INFORMATION
Microsoft Excel version 5.0 allows you to create a special type of file called an autotemplate. Autotemplates are template files that have been saved into the EXCEL\XLSTART directory with the following names:

Worksheet           SHEET.XLT Chart               CHART.XLT MS Excel 4.0 Macro  MACRO.XLT Module              MODULE.XLT Dialog              DIALOG.XLT

In Microsoft Excel for the Macintosh, the files are saved into the 'System Folder:Preferences:Excel Startup Folder (5)' folder with the following names:

Worksheet           Worksheet Chart               Chart MS Excel 4.0 Macro  Macro Module              Module Dialog              Dialog Saving the MODULE.XLT autotemplate does not replace the "Module" item in either of the following locations:

 The Macro submenu on the Insert menu. -or- The Insert dialog box (choose Insert from the shortcut menu).

In the Insert dialog box, the word "Module" will appear twice. The first Module is the default Visual Basic module. The second Module is the autotemplate file MODULE.XLT, which contains your custom settings.

For this reason, it is recommended that you save your Visual Basic autotemplate with a name other than MODULE.XLT. Names you might want to use include MYMODULE.XLT or CUSTOMVB.XLT. Using a different filename will help you distinguish between your autotemplate and the default module template.