Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 97 ADODB Recordset.Find "Invalid Use" error
Has anyone come across this. I am trying to migrate some code back to Excel
97 and getting compile errors with a statement using the Find method on a recordset. e.g. rsExpressions.Find "Name = 'rhammond'" generates an "invalid use of object" error when compiled. I have a correct reference to ADO 2.8 set. It's easy enough to get around using filters, but I'd like to know if this is a local error or something that's been seen before. Thanks in advance, Robin Hammond www.enhanceddatasystems.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 97 ADODB Recordset.Find "Invalid Use" error
Try the following:
dim foundCell as range Set foundCell = Nothing Set foundCell = rsExpressions.Find ("Name = 'rhammond'") if not foundCell is nothing then do something end if Robert Flanagan Macro Systems Delaware, U.S. 302-234-9857 http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel "Robin Hammond" wrote in message ... Has anyone come across this. I am trying to migrate some code back to Excel 97 and getting compile errors with a statement using the Find method on a recordset. e.g. rsExpressions.Find "Name = 'rhammond'" generates an "invalid use of object" error when compiled. I have a correct reference to ADO 2.8 set. It's easy enough to get around using filters, but I'd like to know if this is a local error or something that's been seen before. Thanks in advance, Robin Hammond www.enhanceddatasystems.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error "invalid data source reference" for pivot table | Excel Worksheet Functions | |||
How do I correct Query error "Invalid bracketing of name 'xls.'." | Excel Discussion (Misc queries) | |||
error: "invalid character in text conent" How do I open this file | Excel Discussion (Misc queries) | |||
"Invalid Web Query" error on opening a 2003 worksheet | Excel Discussion (Misc queries) | |||
Need help in excel with "Statement invalid outside Type block. " error | Excel Programming |