Templates not loading as xls version
Possibly:
Code to open new workbook:
'open a new workbook from the .xlt
Workbooks.Add Template:="FullPathAndFilenameIncluding.xlt"
'this will be named whatever the workbook.xlt name is with a number suffix
added to it. The ".xls" extension will be added by Excel automatically.
'remove protection
ActiveWorkbook.Unprotect Password:="ThePassword"
'prompt user to save
Application.Dialogs(xlDialogSaveAs).Show
'the dialog will automatically filter ".xls" as the default file extension
If the workbook.xlt contains a single sheet, and you wish to 'Insert' that
sheet into an existing workbook, then replace the "Workbooks.Add..." line
with:
Worksheets.Add Type:="FullPathAndFilenameIncluding.xlt"
I'm not clear on why the protection is used, to only remove it right off the
bat and save the workbook unprotected.
Good luck!
GS
|