View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jon Peltier[_2_] Jon Peltier[_2_] is offline
external usenet poster
 
Posts: 461
Default Addin compatibility between Excel 2k3 and Excel 2k7

Don -

xlNormal is Excel 8 format in Excel 2003 and Excel 12 format in Excel
2007. The user asked for Excel 8 format in when running both versions.

Alain -

I've used a function that gives me the constant value I need:

Function xl8FileFormat() as long
If Val(Application.Version) = 12 Then
xlFileFormat = 56 ' value of xlExcel8 constant
Else
xlFileFormat = xlNormal
End If
End Function

Do the same kind of thing for PDF.

- Jon
-------
Jon Peltier
Peltier Technical Services, Inc.
http://peltiertech.com/



Don Guillett wrote:
I think?? you can modify this to save as an xls file in either version.
xlNormal

ActiveWorkbook.SaveAs Filename:="C:\yourfolder\yourfilename.xls",
FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False