Hi all you experts!
I am writing in Acc2003 an App I want to deploy and run in later versions aswell. this App creates Excel files, that should be read also by machines running Excel 2003.
this is the code for creating the file (Workbook):
The Comented out 56 in the line:
should be a constant forcing file format to 97-2003, but it gives me a runtime eroor (in 2003. didn't test in 2007).
It runsd fine as long as I stik to 2003, but once I move to 2007, it won't give me 2003 format.
How do you do this?
I am running Office 2003 and testing Office 2007.
TIA
I am writing in Acc2003 an App I want to deploy and run in later versions aswell. this App creates Excel files, that should be read also by machines running Excel 2003.
this is the code for creating the file (Workbook):
Code:
Public Function GetExcelWorkBook(ByRef ApXL As Object, strFilePath As String) As Object
'ApXL is of type of "Excel.Application"
Dim xlWBk As Object
'Get Excel file (WorkBook)
If Not IsNull(ApXL) Then
If FileExists(strFilePath) Then
Set GetExcelWorkBook = ApXL.Workbooks.Open(strFilePath)
Else
Set GetExcelWorkBook = ApXL.Application.Workbooks.Add
ApXL.Application.ActiveWorkbook.SaveAs strFilePath ', 56
End If
End If
End Function
Code:
ApXL.Application.ActiveWorkbook.SaveAs strFilePath ', 56
It runsd fine as long as I stik to 2003, but once I move to 2007, it won't give me 2003 format.
How do you do this?
I am running Office 2003 and testing Office 2007.
TIA