Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 340
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error "invalid data source reference" for pivot table Manny Excel Worksheet Functions 6 April 5th 23 02:58 PM
How do I correct Query error "Invalid bracketing of name 'xls.'." Halp0o9i8 Excel Discussion (Misc queries) 0 August 22nd 08 04:52 AM
error: "invalid character in text conent" How do I open this file RTH Excel Discussion (Misc queries) 5 April 23rd 06 03:04 PM
"Invalid Web Query" error on opening a 2003 worksheet Linus Excel Discussion (Misc queries) 0 February 21st 06 04:55 PM
Need help in excel with "Statement invalid outside Type block. " error Brent[_6_] Excel Programming 3 January 17th 04 03:03 AM


All times are GMT +1. The time now is 06:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"