Cells.Find Bug that's very strange

G

Guest

I hope someone can explain this as we're stratching our heads here.

I have named a string variable strCurrentDate that concatenates data
together to form the following date format: dd/mm/yyyy. What it is then
meant to do is go to a workbook and find that date in that format. So for
example 01/06/2007. The macro is getting as far as activating the workbook
and putting the date in the find function but is then coming back with:

Run-time error '91'
Object variable or with block variable not set

What is happening here? Why can't it find the date that I'm looking for?
When I stop the macro and go in to the workbook and hit Ctrl+F the date has
already been pasted in. If I simply press Find Next it finds it no problem.
So why does the macro stop before doing that? It is pointing at the correct
workbook and activating it so its no that.

Any help would be much appreciated.
 
G

Guest

You might want to paste your code into the thread so we can have a go at
debugging it.

Possibilities: you've put quotes around the date when you don't need to; you
haven't included every argument the Find code needs (try re-recording a macro
finding a sample date and use the whole of that line).
 
P

Peter T

Did you sort out your problem, if your date system is International I rather
suspect you didn't.

Regards,
Peter T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top