collect method of recordset failed

R

rexhuston

hi,
I am trying to use the atpvbaen function of excell to make
some calcultions. Everything is going ok until I hit tis
line:
rec![YTM] = XLapp.Application.Run("ATPVBAEN.XLA!Yield",
report_date_string, end_date, rate, pr, 100, 2, 0)

I get the error Method Collect of Object Recordset failed.
I double checked the parameters in this function to make
sure they are the right type. Anybody have any ideas on
what kind of problems cause this error? My guess is it
would be a reference error, but I cant figure it out.

Thanks,
rex
 
D

Douglas J. Steele

See whether assigning the value of the function call to a variable works,
and then pass that variable to the recordset field.
 
R

rexhuston

I created a var of type double and set the yield = to
that. I now get a mismatch type error. The yield should be
a double so I dont know whats causing that. This mismatch
is probably causing the other error though. Thanks for
your help.

Rex
-----Original Message-----
See whether assigning the value of the function call to a variable works,
and then pass that variable to the recordset field.

--
Doug Steele, Microsoft Access MVP



rexhuston said:
hi,
I am trying to use the atpvbaen function of excell to make
some calcultions. Everything is going ok until I hit tis
line:
rec![YTM] = XLapp.Application.Run("ATPVBAEN.XLA!Yield",
report_date_string, end_date, rate, pr, 100, 2, 0)

I get the error Method Collect of Object Recordset failed.
I double checked the parameters in this function to make
sure they are the right type. Anybody have any ideas on
what kind of problems cause this error? My guess is it
would be a reference error, but I cant figure it out.

Thanks,
rex


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top