I have a test file that creates an Excel.Application object, and it works OK when I run it with F5, but when I compile it and run the executble, the operation fails.
Here is my code:
Opt('MustDeclareVars', 1)
Global $oMyError, $oExcel
_Main()
Exit (1)
Func _Main()
Local $str
$oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") ; Initialize a COM error handler
If IsObj($oMyError) Then
$oExcel = ObjCreate("Excel.Application")
If IsObj($oExcel) Then
$str