Edgar,
Try this, instead of loopin through all sheets:
oExcel=CREATEOBJECT("Excel.Application")
With oExcel
.DisplayAlerts= .F.
........
.WorkBooks.Open(cSpreadsheet+"\"+laFileListWS [ifw,1],1)
oExcel.Calculate()
......
ENDWITH
(not tested)
>I had to activate each spreadsheet of the excel charts in order for them to update linked info from the main spreadsheet, (already populated)...
>
>When I update the main spreadsheet, I must not update links to the charts as this could conflict with charts already being used by users.
>
>So this code occurs after confirming that no chart spreadsheet is in use.
>
>Is there a cleaner way to handle - open to better ways always :~>
>
>>SaveAs is a method of the WorkBook not of the Excel.Application
>>
>>.ActiveWorkBook.SaveAs("C:\Absorb\WebPages\DMD.htm", 44)
>>
>>BTW why you activate all Sheets one by one?
>>
>>>>>What is the value of variable xlHTML?
>>>>
#DEFINE xlHtml 44
>>>>You can use VFP Object Browser to open Excel type library and then drag Constants to an edit window to create the list of Excel constants. You may also find such header file on
http://fox.wikis.com>>>>
>>>>
>>>>>Where can I get a listing of other Methods/Procedures associated with Excel as object?
>>>>
>>>>Look for VBAXL*.CHM file in the office directory or on the office installation CD.
>>>ERROR
>>>
>>>
>>>OLE error code 0x80020006: Unknown name.
>>>
>>> nWSF = ADIR(laFileListWS, cSpreadsheet+"\*.xls")
>>> FOR ifw= 1 to nWSF
>>> oExcel=CREATEOBJECT("Excel.Application")
>>> With oExcel
>>> .DisplayAlerts= .F.
>>> IF SUBSTR(UPPER(laFileListWS [ifw,1]),1,3)="DMD"
>>> .WorkBooks.Open(cSpreadsheet+"\"+laFileListWS [ifw,1],1)
>>> FOR itabor = 1 to .ActiveWorkBook.WorkSheets.Count
>>> .ActiveWorkBook.WorkSheets(m.iTabor).Activate
>>> ENDFOR
>>> .Visible=.T.
>>>? "C:\Absorb\WebPages\DMD.htm"
>>> .SaveAs("C:\Absorb\WebPages\DMD.htm", 44)
>>> .Quit
>>> ENDIF
>>> EndWith
>>> Release oExcel
>>> ENDFOR
>>>
>>>
>>>Now, even Save causes an error?????????
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.