R
Ron Mittelman
Help!!
I'm trying to paste ADO recordset data into an excel spreadsheet from VB6.
The syntax I'm using is:
Range.CopyFromRecordset MyAdoRecordset
where Range is a single Excel cell, and MyAdoRecordset is, well, an ADO
recordset.
This normally works perfectly. However, if the recordset is filtered, the
filter is ignored. For example, the recordset has 20 records. I apply a
filter to the recordset. When I query the AbsolutePosition & RecordCount
properties in the immediate window, I get 1 and 3 (depending on filter)
respectively, as expected. So far so good. When I execute the
CopyFromRecordset method, the spreadsheet contains all 20 rows. Very curious.
Does anybody know why this happens, and how to prevent it?
I'm trying to paste ADO recordset data into an excel spreadsheet from VB6.
The syntax I'm using is:
Range.CopyFromRecordset MyAdoRecordset
where Range is a single Excel cell, and MyAdoRecordset is, well, an ADO
recordset.
This normally works perfectly. However, if the recordset is filtered, the
filter is ignored. For example, the recordset has 20 records. I apply a
filter to the recordset. When I query the AbsolutePosition & RecordCount
properties in the immediate window, I get 1 and 3 (depending on filter)
respectively, as expected. So far so good. When I execute the
CopyFromRecordset method, the spreadsheet contains all 20 rows. Very curious.
Does anybody know why this happens, and how to prevent it?