>I just created a spreadsheet using fox OLE. I can see the finished product on my screen. What do I write within the code to save the file?
>
>I am typing the following.....My object is called objexcel
>
>delete file (cFilename) && incase it already exists
>
>objexcel.save (cFilename)
>
>
>I am getting an error message as follows:
>OLE DISPATCH EXCEPTION CODE 1004 FROM MICROSOFT EXCEL
>UNABLE TO GET THE SAVE PROPERTY OF THE APPLICATION CLASS.
Jason,
"Save" applies to workbook object and "saveas" to Chart, Workbook or Worksheet objects. It should be :
objexcel.ActiveWorkBook.save && It doesn't have any parameter
If you want to change filename then you would use SaveAs :
objexcel.ActiveWorkBook.saveas(cFileName)
Cetin