View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ken Ellis[_2_] Ken Ellis[_2_] is offline
external usenet poster
 
Posts: 4
Default 2003 to 2007 conversion. Unable to save workbook

The following code worked in Excel 2003 but when I run it in Excel 2007 I
get the following message:

"The following features cannot be saved in macro free workbooks
.VB"

Set wbResults = Workbooks.Add(Template:=stResultsTemplateFileParam )
wbResults.Sheets(1).Name = "Test Results"
wbResults.SaveAs Filename:=stResultsFileFullname

The template file has a macro and is defined as an .xlsm file. I tried
adding '.xlsm' to stResultsTemplateFileParam but no good.
I cannot see any property for wbResults that I could set to specify the
workbook as .xlsm.

Thanks for any help.

Ken Ellis