` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Windows API: Closing Excel from Clarion
2003-05-01 -- Ville Vahtera
 
> I use an OLE object to start Excel. When I call Quit Excel application > disappears, but I still see it in process list. > If I call the code several time it will start a new instance of Excel each > time. Try this example. PROGRAM MAP module('winapi$X¹Y…¡Ñcreate}='Excel.Application' ?Ole1{'woÜ›?ole1{'cells(1,1).value'} Accept Case Event() Of Event:CloseWindow !TitleString = 'Microsoft Excel - Book1' TitleString = 'Microsoft Excel' WindowHandle=FindWindow(0,Address(TitleString)) If WindowHandle PostMessage(WindowHandle,WM_Close,0,0) Else Message('Application with text not found to be running > ' & TitleString ) End Destroy(?Ole1) End END HTH, -Ville


Today is November 23, 2024, 2:07 am
This article has been viewed 35345 times.
Google search has resulted in 170 hits on this article since January 25, 2004.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: