View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
Andibevan[_4_] Andibevan[_4_] is offline
external usenet poster
 
Posts: 103
Default BeforeSave Problem

Hi Rob - I don't think I was clear enough, what I mean is I want to save an
excel template that forces the user to save an xls file with certain
specified bits of the file name.

If I change the line to what is below when the somebody uses the template it
will keep creating more template files, rather than xls files. Sorry it is
a bit difficult to explain, but if you try and create an .xlt file with the
code you originally gave me you will see the problem.

Thanks

Andi

"Rob Bovey" wrote in message
...
"Andibevan" wrote in message
...
This does create a problem when trying to save it as a template file as
the
code forces the file to be saved as an xls.

The only solution I can see is to then rename the file to the template..


You can save the workbook as a template by changing your SaveAs line

to
the following:

ActiveWorkbook.SaveAs _
Filename:=FilePath & varInput & ".xlt", _
FileFormat:=xlTemplate

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm