>A project with some automation generates charts. In cases were the values are zero, the user wants a message. Without the messagebox, when oExcel becomes visible, the Excel application is on top of the VFP interface. Thats what I want.
>
>However, when the messagebox is called and closed, then oExcel is behind the VFP form? Is there an easy way to assure that Excel will be on top after the mesaagebox is closed?
>
>Thanks
oEx = CREATEOBJECT("Excel.application")
oEx.Visible=.t.
* click on VFP window
nHwnd = oEx.Hwnd
DECLARE INTEGER SetForegroundWindow IN user32 INTEGER hwnd
SetForegroundWindow(nHwnd)