>Thanks for the response. In my code I have made excel visible by the command you described (mvFile.Application.Visible = .T.). What I am having trouble with is when opening the spreadsheet in excel, the spreadsheet is hidden. Excel is visible, however to see the spreadsheet you have to go to Window Unhide. I believe I am missing a crucial link between the ActiveX code in VFP and the visual basic code in Excel. I record a macro in Excel and the code will not work under ActiveX VFP.
>
>For example to open a file in Excel returns
> Workbooks.Open FileName:="C:\data\Bud00\FS.xls"
> ActiveWorkbook.Close
>However, when I run this code in VFP
> oSheet = CreateObject("Excel.Sheet")
> oSheet.Application.Visible=.T.
> oSheet.Workbooks.Open FileName:="C:\data\Bud00\FS.xls"
> OR
> oSheet.Workbooks.Open ("C:\data\Bud00\FS.xls")
>I get error messages.
>
>Any suggestions
Why don't you try using CREATEOBJECT instead of GETOBJECT()? This is how I usually do it.
oXL = CREATEOBJECT("Excel.Application")
oXL.workBooks.Open("C:\data\Bud00\FS.xls")
oXL.Visible = .T.
Erik Moore
Clientelligence