GetActiveObject + FWH = Windows Exception
Posted: Wed May 10, 2006 5:25 pm
I just upgraded to FWH 2.7 and March 2006 xHarbour Builder.
Most everything works ok except for a couple of things.
I have narrowed it down to the sample below that creates the windows exception error.
If you remove the section with GetActiveObject() function there is no exception error.
#INCLUDE "FIVEWIN.CH"
function main
local oExcel
TRY
oExcel := GetActiveObject( "Excel.Application" )
CATCH
TRY
oExcel := CreateObject( "Excel.Application" )
CATCH
Alert( "ERROR! Excel not avialable. [" + Ole2TxtError()+ "]" )
RETU(.f.)
END
END
oExcel:WorkBooks:Add()
oExcel:Visible := .t.
return nil
Most everything works ok except for a couple of things.
I have narrowed it down to the sample below that creates the windows exception error.
If you remove the section with GetActiveObject() function there is no exception error.
#INCLUDE "FIVEWIN.CH"
function main
local oExcel
TRY
oExcel := GetActiveObject( "Excel.Application" )
CATCH
TRY
oExcel := CreateObject( "Excel.Application" )
CATCH
Alert( "ERROR! Excel not avialable. [" + Ole2TxtError()+ "]" )
RETU(.f.)
END
END
oExcel:WorkBooks:Add()
oExcel:Visible := .t.
return nil