|
-
Jul 21st, 2004, 05:33 PM
#1
Thread Starter
New Member
Excel 97 & VBA Runtime Error 1004
Hello
I have an excel spreadsheet with VB code in it and it works great and all the time on Excel 2000 and 2003.
I am running it on Excel 97 and it seems to work the first time only.
The following line gives me an error 1004, Failed to get the Find property of the Range class
Set c = Worksheets("ListSTB").Range("A1:A100").Find(Riferimento, LookIn:=xlValues)
The logic is this, by clicking on a push button, Worksheet ListSTB is searched for the value stored in thevariable Riferimento.
It goesthrough this in a loop the first time successfully.
If the user decides to redo it, it then fails.
Can anyone help?
-
Jul 22nd, 2004, 02:14 AM
#2
Addicted Member
might be "lazy programming" (grin)
Try :-
Code:
Set c = Worksheets("ListSTB").Range("A1:A100").Find(What:=Riferimento, After:=[A1], LookIn:=xlValues)
Regards
BrianB
-------------------------------
-
Jul 22nd, 2004, 08:45 AM
#3
Thread Starter
New Member
Is it in Excel 97?
Hi
Thanks for your input. I had tried that and tried again. It still does not work the second time. I get a run time error 1004
"Unable to get the Find property of the range class"
It works all the time in Excel 2000 and above. Is there a problem with Find functionality in Excel 97?
Thanks
-
Jul 22nd, 2004, 09:25 AM
#4
Addicted Member
I work for a large company and we are still using 97 with no problems.
I suggest you post the full code
Regards
BrianB
-------------------------------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|