Limitations in UDF:s

  • Thread starter Thread starter Clark B
  • Start date Start date
C

Clark B

Hi there!

I have user defined functions for accessing data from a db. I have a update
button instead of getting the data directly from the UDF for some reasons. I
want to store the data in a recordset and then use the filter property to
get the correct data for each cell. Now the limitations of the UDF (cannot
change the excel environment) also seems to be valid to recordsets in VBA. I
can not use filter property or find method, but MoveNext seems to work. I
guess it is because filter property change the recordset whereas MoveNext
does not. But why are there limitations at all on recordsets?I can't see a
recordset interacting directly with the sheet, disturbing calculations and
dependencies?

By the way, does anyone know a book or site about programming add-ins with
user defined functions and data access? I found a great deal from here, but
I am always eager to learn more.

Thanks in advance

Clarkie
 
Hi Clarkie

You don't provide much code or detail, so I'm just assuming you do this with ADO. If so,
the limitations are the recordset's own, defined by its lock type (readonly / pessimistic/
optimistic) and by cursor type. If your cursor is adOpenForwardOnly, which I suspect, you
are able to do very little with it. Try setting it to adOpenKeyset and see what happens.
 
Back
Top