Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How to make a .XLTM template file default to save as .XLSM type?

I have a Excel 2007 macro-enabled template (.XLTM) which I use regularly.
Whenever I open this template then use save or save as to create a new file
the default workbook type of .XLSX is selected instead of .XLSM.

How can I change the default behaviour for this template to automatically
select a .XLSM format in the "Save As" dialog wihtout changing it for every
document as happens by using the 'Excel OptionsSaveSave Files in this
Format' drop down box.

Cheers
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 464
Default How to make a .XLTM template file default to save as .XLSM type?

Perhaps some code in ThisWorkbook module of the Template;

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Dim strSaveAs As String
If SaveAsUI = True And Me.FileFormat = xlTemplate Then
Cancel = True
Application.EnableEvents = False
'Not sure of FileFilter
strSaveAs = Application.GetSaveAsFilename _
(FileFilter:="Excel Macro-Enabled Workbook(*.xlsm) *.xlsm")
Me.SaveAs strSaveAs
Application.EnableEvents = True
End If
End Sub



--
Regards
Dave Hawley
www.ozgrid.com
"NZCoyote" wrote in message
...
I have a Excel 2007 macro-enabled template (.XLTM) which I use regularly.
Whenever I open this template then use save or save as to create a new
file
the default workbook type of .XLSX is selected instead of .XLSM.

How can I change the default behaviour for this template to automatically
select a .XLSM format in the "Save As" dialog wihtout changing it for
every
document as happens by using the 'Excel OptionsSaveSave Files in this
Format' drop down box.

Cheers


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
XLSM File Will Not Save Macros in Quick Access Toolbar Louis Pace Excel Discussion (Misc queries) 4 September 29th 09 06:04 PM
excel 2003 file converted to .xlsm file when save to network drive Chris Excel Discussion (Misc queries) 3 January 23rd 08 02:56 PM
Default a workbook to save as a xlsm (macro-enabled) in 2007 Razzer204 Excel Discussion (Misc queries) 3 March 21st 07 06:10 PM
default save as file type does not work gregf Excel Discussion (Misc queries) 5 February 10th 06 07:50 PM
How do I change file/open/"files of type" to default to "all file. How do I changefiles of type default Excel Discussion (Misc queries) 1 April 19th 05 10:45 PM


All times are GMT +1. The time now is 05:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"