# Microsoft Office Application Help - Excel Help forum > Excel Programming / VBA / Macros >  >  vb project can't be saved in a macro free workbook

## 2funny4words

I have been editing the following code so that it will work a little better for my needs, but now it keeps saying that the following features can not be saved in a macro free workbook  * VB Project. Other than 4 command buttons that use codes to print, I don't need anything from the VB Project to be saved with the sheet.




```
Please Login or Register  to view this content.
```


I am using excel 2007 but in compatability mode, (since the computer that the end users work with are all 2003). The file I am working on is a .xls file and I am saving it as the same. 
If I select yes to save as a macro free file the code finishes and works fine.
If anyone has any ideas on why this error is coming up I would appreciate it.

----------


## mojo249

When you save the file (Save As), make sure the Save As Type is Excel 97-2003 Workbook (.xls) and not Excel Workbook (.xlsx).

Dion

----------


## 2funny4words

when I go to open the new file after accepting that it will be saved as a macro free workbook, the new file says "the file is in a different format than specified by the file extention. verify that the file is not corrupt ... do you want to open the file?" 
On opening the file the data is intact, and there is no coding.

----------


## 2funny4words

> When you save the file (Save As), make sure the Save As Type is Excel 97-2003 Workbook (.xls) and not Excel Workbook (.xlsx).
> 
> Dion



the code above saves just a copy of the active worksheet. it specifies in this line that it is to be saved as .xls




```
Please Login or Register  to view this content.
```

----------


## shg

See the FileFormat argument to the SaveAs method.

----------


## 2funny4words

> See the FileFormat argument to the SaveAs method.



SHG,  I googled your comment and learned? that 07 does not auto save as the current file type, but I am not sure on how I am supposed to fix the problem. It looks as if I need to add another line of code that confirms that the file is indeed supposed to be .xls, but where and how do I do this?

----------


## shg

From Help:





> expression.SaveAs(FileName, *FileFormat*, Password, WriteResPassword, ReadOnlyRecommended, CreateBackup, AddToMru, TextCodepage, TextVisualLayout, Local)
> 
> expression   A variable that represents a Worksheet object.
> 
> *Parameters*
> 
> ...
> 
> *FileFormat* Optional Variant The file format to use when you save the file. For a list of valid choices, see the FileFormat property. For an existing file, the default format is the last file format specified; for a new file, the default is the format of the version of Excel being used.
> ...

----------


## mojo249

The file format for saving an Excel 2003 format file in Excel 2007 is xlExcel8




```
Please Login or Register  to view this content.
```


Here's a free tip for you: if you're stuck on the exact syntax required (especially 'simple' tasks like this), try recording a macro while you perform the action.

----------


## 2funny4words

Thanks mojo249, the line worked as needed. Thanks shg for your help.

----------

