*-- Create a reference to an Excel OLE object XLApp = CREATEOBJECT('Excel.Application') *-- Create a reference to a workbook oMyXLWorkbook = XLApp.Application.Workbooks.Add *-- Create a reference to a worksheet XLSheet = oMyXLWorkbook.Worksheets.Add with xlApp *-- I only need one sheet, so throw away *-- the others .DisplayAlerts = .F. .ActiveWorkBook.Worksheets(3).Delete .ActiveWorkBook.Worksheets(2).Delete *-- This also works *-- .ActiveWorkBook.Worksheets(2).Delete *-- .ActiveWorkBook.Worksheets(2).Delete *-- Alarm wieder an .DisplayAlerts = .T. endwith *-- Position the Excel Application window so you can still see VFP's *-- application window behind it. *-- WITH XLApp *-- .Height = 220 *-- .Width = 540 *-- .Left = 0 *-- .Top = 220 *-- ENDWITH *-- Show the object so we can see what is happening. XLApp.Visible = .T. *-- now do the stuff with xlsheet .... endwith *-- And when done, save and clean up if ! empty(lc_XLSFile) xlSheet.SaveAs(lc_xlsFile) endif if MessageBox(; "Would you like to edit the Excel-Sheet now?", ; 32+4, "Question") # 6 xlApp.Quit else xlApp.Visible = .T. endif xlSheet = .NULL. oMyXLWorkbook = .NULL. xlApp = .NULL.Are You sure, You do not have any temporary object-references