Article ID: 156548
Article Last Modified on 7/13/2004
PUBLIC frmMyForm
frmMyForm = CREATEOBJECT("form")
frmMyForm.AddObject("oleTest","OLEControl","Excel.Chart")
frmMyForm.Visible=.T.
After the code runs, a form appears, but you do not see the Excel chart.
WAIT WINDOW frmMyForm.oleTest.Application.NameThe message that appears is "Microsoft Visual FoxPro" in Visual FoxPro version 5.0 and "Microsoft Excel" in Visual FoxPro version 3.x.
frmMyForm.oleTest.Object.Application.Visible=.t.If you use the following Quit method:
frmMyForm.oleTest.application.quitVisual FoxPro version 5.0 calls the Quit method of Visual FoxPro, instead of the Quit method of the OLE object as in Visual FoxPro version 3.x.
WAIT WINDOW frmMyForm.oleTest.Object.Application.Name frmMyForm.oleTest.Object.Application.Quit
Keywords: kbhowto kboop KB156548