LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Excel 2007 Save As xlsm by default

How can I set the SaveAs dialog to default to *.xlsm by default using the
method pinched from the Excel help file? i.e.

'Create file dialog object
Set FD = Application.FileDialog(MsoFileDialogType.msoFileDi alogSaveAs)

'Set the default file name (& path)
FD.InitialFileName = Application.DefaultFilePath & "\Planning
Spreadsheet.xls"


I've tried:
' Specify macro enabled workbook for Excel 2007
If Application.Version = 12 Then FD.InitialFileName =
application.DefaultFilePath & "\Planning Spreadsheet.xlsm"

I've also tried:
Application.DefaultSaveFormat = xlOpenXMLWorkbookMacroEnabled

However it always seems to revert to the *.xlsx file type.

Do I need to rewrite using the application.Dialogs(xlDialogSaveAs)
approach?

Basically I want to save as an xls file if the Excel version is 2003 and as
an xlsm version if 2007

Has anyone else noticed Excel 2007 falling over after a while if you open a
workbook containing macros from a previous version in compatibility mode?
Seems to need saving as *.xlsm to be happy.

Many thanks,

Z
 
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
How to make a .XLTM template file default to save as .XLSM type? NZCoyote Excel Discussion (Misc queries) 1 April 8th 10 06:01 AM
set Excel 2007 as default to save files in Excel 2003 .xls format John UBS Setting up and Configuration of Excel 1 March 26th 10 02:53 PM
Save as default Excel 2007 nancyt Excel Discussion (Misc queries) 4 September 11th 09 09:55 PM
How do I set Excel 2007 pivot table default to not save source dat Brian Poschner Excel Discussion (Misc queries) 1 January 19th 08 12:30 AM
Default a workbook to save as a xlsm (macro-enabled) in 2007 Razzer204 Excel Discussion (Misc queries) 3 March 21st 07 06:10 PM


All times are GMT +1. The time now is 09:37 AM.

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"