Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why is my OLE container not visible?
Message
From
19/01/2005 18:48:25
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Network:
Windows NT
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00978732
Message ID:
00978734
Views:
23
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform