Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel: check if invocation successful
Message
 
 
To
12/02/2015 16:32:47
Al Doman (Online)
M3 Enterprises Inc.
North Vancouver, British Columbia, Canada
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows Server 2003
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01615261
Message ID:
01615265
Views:
35
>
* If you do something like
>
>m.loExcel = CREATEOBJECT( "Excel.Application" )
>
>* can you then reliably check if it was instantiated successfully with
>
>IF TYPE( "m.loExcel" ) == "O" AND NOT ISNULL( m.loExcel )
>  * Invocation successful
>
>
>Related question - Excel 2007 is installed in the dev VM. For test purposes is there an easy way ( short of uninstalling the product ) to temporarily tweak Excel so it won't instantiate successfully?

You need to put createobject in try/catch block.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform