![]() |
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 |
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 |
All times are GMT +1. The time now is 03:00 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com