View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default VB Programming, trying to save as lower version

Setting the format of the file will not change the references. Also,
saving in xlExcel9597 format is not saving down. It is creating a file that
has two copies of your workbook - one in xl95 format and one in xl97 format.
The format has not changed since xl97.

You should do your development in the lowest version of excel that wil use
the application.
--
Regards,
Tom Ogilvy


"Jim" wrote in message
om...
My app has the Excel 11.0 reference and is running on a pc with 9.0.

(11.0 refernece is excel.exe. i used to use excel.olb what happened
to that
library in this release)

How do I save down?

When I code the SaveAs I pass a filename and xlExcel9597 as the
format. My app quits and excel is still running. It does not fall
down to my error handler. It goes to Case 10,9,7 and just stops:


Select Case m_intVersion
Case 11
m_objWorkbook.SaveAs Filename:=m_strExcelFileName
Case 10, 9, 7
m_objWorkbook.SaveAs Filename:=m_strExcelFileName,
FileFormat:=xlExcel9795, _
Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False, CreateBackup:=False
Case 5
m_objWorkbook.SaveAs Filename:=m_strExcelFileName,
FileFormat:=xlExcel5
Case Else
m_objWorkbook.SaveAs Filename:=m_strExcelFileName,
FileFormat:=xlExcel5
End Select

I thought I would be able to save down. must be missing something but
searches have not turned up anything.

Thanx...Jim