>I am experimenting with OLE containers automating Excel. I have inserted code in the Init method of a simple form to perform this function. Here is the code that I have been using.
>
>
>thisform.AddObject("oleXL", "OleControl", "Excel.Application.11")
>WITH thisform.oleXL
> .left = 75
> .top = 75
> .width = 200
> .height = 100
> .visible = .T.
> wbk = .object.workbooks
>ENDWITH
>wbk.add
>WITH thisform.oleXL.Object
>* .visible = .T. ; Makes Excel visible as separate application
> .cells(1,1).value = 7
>ENDWITH
>
>
>This all executes without error, however, neither the OleControl, nor the contained Excel workbook are visible. If I remove the comment on the third line from the bottom, I can seel Excel as a separate application.
Update: Doh! I misread your post. Sorry about that.