Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a simple excel table that is converted to a recordset. The RS field
names are "COLA", "COLB", "COLC"... etc. I can output the field names and the complete RS to a worksheet. My problem is I can't filter the RS. Here's the code I use to output the data: ============================= 'output headers For lngC = 0 To RS.Fields.Count - 1 rngCell(1, lngC + 1).Value = RS.Fields(lngC).Name Next RS.MoveFirst 'output the complete RS data - starting the next row rngCell(2).CopyFromRecordset RS, 1 ============================= I tried this code, but it was not successful RS.MoveFirst RS.Filter = "[COLB]='17'" rngCell(2).CopyFromRecordset RS, 1 ** The error message is "Filter cannot be opened" ** when executing the RS.Filter code. Can Excel do RS filtering, sorting, or finding? Is my recordset incorrectly defined? I've referencing MS ADO 2.8 library Thanks - Pat |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pivot Table Report Filter - "OR" instead of "AND" Multiple Filters | Excel Discussion (Misc queries) | |||
use "Filter" to filter one range in many worksheets at a time | Excel Worksheet Functions | |||
Advanced filter formula for "contains="Sept" | Excel Worksheet Functions | |||
how can I use "filter" but keep "title" row in sight? | Excel Discussion (Misc queries) | |||
Excel will not "show all" from an Advanced Filter on a sheet with protected cells. | Excel Programming |