View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Carl Carl is offline
external usenet poster
 
Posts: 361
Default Cells.Find Bug that's very strange

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.