General information
Category:
COM/DCOM and OLE Automation
Title:
Simple VFP7 Excel file save problem
I'm having problems with doing a 'SaveAs' command within VFP7.0 to save a Excel file under a different name.
Basically, I am opening a preformatted blank Excel worksheet (let's say temp.xls), updating some text and data, then trying to save as a different file name.
Here is the basic concept code:
xLapp.ActiveWorkbook.SaveCopyAs(cFn)
&& where cFn is the full text path and name of the file to save as.
xLapp.Quit && close Excel
I need be able to programically respond to the overwrite prompt, should the (cFn) already exist, and also respond to the Save changes prompt(Yes.No.Cancel) from the temp.xls file which is still open. In the first case, I want to 'Overwrite' and in the second case select 'No'.
Anyone know the commands necessry to add to the .SaveAs.??? command...
Thanks Much!
Scott Rands
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only