General information
Category:
Coding, syntax & commands
>>>Greetings!
>>>
>>>When running an .APP, I can successfully launch Excel under program control by issuing "RUN /N excel c:\temp". This loads an .XLS file called TEMP into Excel. (The temp file is created by FoxPro based on preferences in a grid.) Apparently,
>>>I will appreciate any help. Thank you!
>>>
>>>Michael Reynolds
>>
>>
>>If you are using VFP you can subclass Excel and control it totally from within VFP. There are some samples on my web page you can download, but to start excel you might try:
>>oxcel=createobject('excel.application')
>>then test with
>>? type('oxcel.application')='O'
>
>Hi, John.
>
>Thanks for writing! I have experimented with CreateObject and Excel seems to load in the background. The only way I can see that it's active is my doing "Ctrl+Alt+Del" and looking in the Close Program dialog. If I release the object variable assigned with CreateObject, Excel closes. I wonder whether my system is having conflicts.
>
>I'll take a look at your web site. Thanks for your help!
>
>Michael Reynolds
When you use createobject() to launch an application it does open it, but it's not visible. Try this code
oxcel=CreateObject('excel.application')
?type(oxcel.application) = 'O'
oxcel.visible = .t.
When you set the visible property of the OLE object to true it becomes visible.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only