How a template opens in xl2000

C

Clayman

I have created a series of templates to use for payroll purposes. Testing
them out on my computer, they kept opening as templates (*.xlt), not as
workbooks (*.xls). So, I wrote a macro to automagically save it as the weekly
workbook, with an out for editing the template.

I went to a supervisor (the guy who will be using the workbooks from the
macros) to show him the macro, and Master.xlt opened as Master1.xls on his
computer.

What gives? How does XL determine if it will open a *.xlt file as a template
or workbook? Did I spend half a day on cool coding for naught? (even got the
assistant involved!)
 
C

Clayman

I think I've got some of this figured out - some, but not all.

If you open the .XLT file from Excel (via File|Open), it will open as a
template.

If, however, you open the .XLT from Explorer (double-click), it will open as
a worksheet.

Am I correct?
 
B

Beth Melton

Yes, that is correct but I suspect you don't understand the rationale behind
the behaviors. :)

When you open a template from the Open dialog box you are opening it for
editing changes. When you double-click a template from an Exploring window,
such as My Computer, then the default action for the template is to create a
new workbook based on the template. If you right-click the file you'll see
commands such as Open and New. Note how New is bold, which indicates the
default double-click action.

So you've found if you want to create new workbooks based on your template
then you can double-click it from an Exploring window. Another method, which
is more commonly used, is to place the template in the Templates folder.
This will allow you to click File/New in Excel and create a new document
based on the template.

The best way to determine the location of your Templates folder is to create
a new workbook and save it as a template. When you change the Save As type
to Excel Template the Save In location will automatically change to your
Template location. Then click the drop down for Save in and note the
location of the Templates folder.

Please post all follow-up questions to the newsgroup. Requests for
assistance by email cannot be acknowledged.

~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP

Coauthor of Word 2007 Inside Out:
http://www.microsoft.com/MSPress/books/9801.aspx#AboutTheBook

Word FAQ: http://mvps.org/word
TechTrax eZine: http://mousetrax.com/techtrax/
MVP FAQ site: http://mvps.org/
 
C

Clayman

Thank you, Ms. Melton.

The templates are stored on a server and are updated as employees are moved
from division to division. I know this is not the best approach, but it's
biding time until a proper DBMS is developed.

When I first posted, I had no idea why sometimes they were opening as
templates and other times as workbooks. What you've said makes a lot of
sense, though.

Thank you for your response.
 
Top