Please help to fix an error
Hi,
I compiled my application in release mode and when I try to run it I get an error:
(this->get_Item(Index,(LPDISPATCH*)&RHS)) Error:C0000005 (-1073741819) @C:/program files/borland/cbuilder6/include/vcl/Excel_2k.h/9908
Here is my code:
...
try {
ExcelApplication1->Connect();
ExcelApplication1->set_Visible(true,true);
ExcelApplication1->set_DisplayAlerts(0,false);
ExcelWorkbook1->ConnectTo(ExcelApplication1->Workbooks->Add());
ExcelWorksheet1->ConnectTo(ExcelApplication1->Worksheets->get_Item(TVariant)1));
...
An error occurs while executing that last line. Any suggestion how to fix it? I can't understand why it isn't correct... :(
# 2 Re: Please help to fix an error
Maybe u missed the comma here :
get_Item(TVariant)1)
mst be :
get_Item(TVariant),1)
the error point exactly to this function so is that the problem ?
Amahdy at 2007-11-11 21:00:25 >

# 4 Re: Please help to fix an error
Maybe u missed the comma here :
get_Item(TVariant)1)
mst be :
get_Item(TVariant),1)
the error point exactly to this function so is that the problem ?
Hi, Amahdy,
it doesn't work. Problem is not a comma probably.
# 5 Re: Please help to fix an error
check if TVariant is a suitabel index and 1 can be passed to your RHS , if all is correct so check into the function itself maybe the problem is there coz the error contains "this" ..
Amahdy at 2007-11-11 21:03:28 >
