Help with .Find Function in code
Thanks for the responds but I am still getting the same error message. Is
result a range or a string variable?
"Mishell" wrote:
If the searched value was not found, you will get that error message:
Try like this to check that Not result Is Nothing :
Set result = dataCorrWS.Range("C2:C" & dataCorrWSlastRow).Find(c.Value, _
LookIn:=xlValues)
If Not result Is Nothing Then
result.Activate
End If
Mishell
"Ayo" wrote in message
...
I am trying to use the Find in my code but I am getting a "Object variable
or
With block variable not set" error message on the code line below.
dataCorrWS.Range("C2:C" & dataCorrWSlastRow).Find(c.Value,
LookIn:=xlValues).Activate
but another variation of the code:
Worksheets("InSite Milestones").Range("C2:C3000").Find("NY09337C",
LookIn:=xlValues).Activate
works fine. Any ideas.
|