View Single Post
 
Old 03-22-2013, 01:01 PM
CGM3 CGM3 is offline Windows XP Office 2007
Advanced Beginner
 
Join Date: Oct 2009
Posts: 38
CGM3 is on a distinguished road
Unhappy Excel 2010 Not Recognizing Some FileFormat Values

I'm upgrading/converting old spreadsheets (mostly Excel 2000, but with some Quattro Pro) to Excel 2010, and in one of them I encounter Error 1004 (Method 'SaveAs' of object '_Workbook' failed) with these commands:

Code:
ActiveWorkbook.SaveAs FileName:=mname, FileFormat:=xlExcel9795, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:=False
Code:
ActiveWorkbook.SaveAs FileName:=sname, FileFormat:=xlDBF3, CreateBackup:=False
In both instances, I've traced the problem to the FileFormat specification (which, if eliminated, allows the method to work, albeit saving in the default file format). I was able to get the first line to work by replacing xlExcel9795 with xlExcel8 to save the workbook in Excel 97-2003 format, but I haven't been able to find a replacement/alternate for xlDBF3 (which I believe is dBase III).

Any suggestions as to why the FileFormat values (which are given in the online Excel Developer Help) don't work, or something I can use to save as a DBF3 file?
Reply With Quote