OLE IDispatch exception code 0 from ?:?..
I'm getting this error message when I want to export data from an array to an Excel sheet. BUT I only get this error when column 2 has a date value AND column 3 of my table also has a date value. I use this procedure for more than 10 tables/arrays and all runs well, except in this case. This is the (simple) code (thisform.laexport is the array):
For lni=1 To lnrow
For lnii=1 To lncol
If Vartype(Thisform.laexport (lni,lnii))=="C"
loexcel.Cells (lni+1,lnii).Value= AlltriM(Thisform.laexport (lni,lnii))
Else
* this is where foxpro hangs on the second date loexcel.Cells (lni+1,lnii).Value= Thisform.laexport (lni,lnii)
Endif
Endfor
Endfor
Does anyone know why I get this error message only in this particular case? (2 columns following each other and both containing a date value) I've already tried the datatoclip() method in combination with a cursor instead of an array but the problem is that memo fields are exported as "Memo" and do not display their true value. So I cannot use it. But I didn't receive the error if this info is any help.
Thanks in advance!
Cheers
LotusE
I'm getting this error message when I want to export data from an array to an Excel sheet. BUT I only get this error when column 2 has a date value AND column 3 of my table also has a date value. I use this procedure for more than 10 tables/arrays and all runs well, except in this case. This is the (simple) code (thisform.laexport is the array):
For lni=1 To lnrow
For lnii=1 To lncol
If Vartype(Thisform.laexport (lni,lnii))=="C"
loexcel.Cells (lni+1,lnii).Value= AlltriM(Thisform.laexport (lni,lnii))
Else
* this is where foxpro hangs on the second date loexcel.Cells (lni+1,lnii).Value= Thisform.laexport (lni,lnii)
Endif
Endfor
Endfor
Does anyone know why I get this error message only in this particular case? (2 columns following each other and both containing a date value) I've already tried the datatoclip() method in combination with a cursor instead of an array but the problem is that memo fields are exported as "Memo" and do not display their true value. So I cannot use it. But I didn't receive the error if this info is any help.
Thanks in advance!
Cheers
LotusE