2003 to 2007 conversion. Unable to save workbook

K

Ken Ellis

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top