oExcel = CreateObject("Excel.Application") oExcel.Workbooks.Open("c:\temp.xls") oExcel.Visible = .T.2) Use the ShellExecute API
Declare Integer ShellExecute ; In shell32.dll ; Integer nWinHandle, ; String cOperation, ; String cFileName, ; String cParameters, ; String cDirectory, ; Integer nShowWindow Declare Integer FindWindow ; In win32api ; String cNull, String cWinName ShellExecute(FindWindow(0, _screen.Caption), ; "Open", "c:\temp.xls", ; "", Sys(2023), 1)