Any way to open Excel template (.xlt) from desktop shortcut?

derekpegg

Board Regular
Joined
Oct 7, 2005
Messages
145
I have an Excel template (.xlt) which I have distributed to various users. They periodically need to update their individual template then use it to create individual files from.

I have a desktop shortcut to the template set up on each user's computer. This opens a copy of the template (ie. a standard .xls) to work on individual files from their template.

At present, when they need to make changes to their template (.xlt), I have to tell them to open Excel, file, open, locate the file and open it. This opens the .xlt as it is opened from within Excel.

I was wondering if thee was a way to open the .xlt from the desktop (maybe using some sort of code?) using another shortcut as this will be a much simpler process and leads to less errors in the 2 open methods - as long as it is clear which shortcut opens the template and which one opens a new file created from the template.

Hope this makes sense and thanks for any help.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
What about this - as templates are only a file extension difference of "t" instead of "s" - make the changes as XLS then save as xlt & replace the original xlt with new xlt. You would of course be careful to keep a backup cpy & naming the your original XLS's with a date format (usually yymmdd).

From my experience I do not trust users to know what they are doing to be able make changes, save the new file in the correct place & to delete (or backup the old file) if necessary.
 
Upvote 0
Code:
Sub OpenTemplate()
On Error Resume Next
Workbooks("Whatever.xlt").Activate
If Err <> 0 Then Workbooks.Open ("C:\Whatever.xlt"), Editable:=True 'Amend path as required
On Error GoTo 0
End Sub
 
Upvote 0
Thanks for the suggestions. Think we've solved it by creating a batch file with "start excel [path to .xlt file]" in notepad. Created a desktop shortcut to this file and it seems to work.
 
Upvote 0

Forum statistics

Threads
1,214,984
Messages
6,122,601
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top