View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kirk Kirk is offline
external usenet poster
 
Posts: 41
Default Why doesn't this work?

I have the following:

Selection.Find(What:=strStartDt, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate

Basically what I am trying to do is to search for a value (strStartDt) on a
sheet. This doesn't work, but if I hard code strStartDt to a value (i.e.
1-Feb-04), it works find and dandy. I used this same code in a ADP file and
figure it should work in Excel as well.

I get the following error:
Run-time error '91':
Object variable or With block variable not set

Any ideas as to why this is?

Kirk