declare long ShellExecute in "shell32.dll" ; long hwnd, string lpszOp, ; string lpszFile, string lpszParams, ; string lpszDir, long nShowCmd ShellExecute(0,'Open',GETFILE('xls'),'','',1) DECLARE Sleep IN kernel32 INTEGER dwMilliseconds Sleep(1000*30) && Hopefully half a minute would be enough to change one value TRY loExcel = GETOBJECT(,'Excel.application') IF VARTYPE(m.loExcel) = 'O' *loExcel.Save(.t.) - doesn't work, so users may need to also press Save button themselves loExcel.Quit() ENDIF CATCH TO loError * Problem ENDTRY>hi,
>CLOSE all >SET DATE BRITISH >SET CENTURY on >thisform.text9.Value=GETFILE('xls') > > declare long ShellExecute in "shell32.dll" ; > long hwnd, string lpszOp, ; > string lpszFile, string lpszParams, ; > string lpszDir, long nShowCmd >ShellExecute(0,'Open',thisform.text9.Value,'','',1) >*************************************** >IMPORT FROM (thisform.text9.value) TYPE xls >>thanks