Quote from GATrader:
Hi . I have an Excel sheet which fetched data using DDE from a charting program. I also have a vb.net program which takes these values and assigns them to an array in VB. The problem is in my timer. Occasionally, I get this message.
first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
Additional information: Call was rejected by callee.
I think it is because an assigment statement such as
vxl(rw).index = xlbook.Application.Cells(rw, 2).value
vxl(rw).TrigrBuy = xlbook.Application.Cells(rw, 3).value
vxl(rw).TrigSell = xlbook.Application.Cells(rw, 4).value
which fetches the data from eXcel can't communicate to excel since Excel is in edit mode probably from a cell change thru the DDe. IS there a way to handle this error or a way to do the assignment statments ONLY when Excel is ready? Thanks
You can control (term is Automation) Excel from VB or VB.net code... so in your VB(.net) code set Excel in the mode you want it in... grab what you need and then reset Excel whatever mode...
Question: What are you doing from VB.net that you cannot not do from Excel... just curious...
cj...

__________________
HAVE STOP - WILL TRADE
If You Have The Vision We Have The Code