Trouble with Find method locating Date fields - works great with String fields.

M

Marcel K.

I am having trouble with Find method recognizing a date
formatted field below the varExistingRecord
= "01/01/2002" - It doesn't work, but when I try and find
a field that is entirely string data it works fine...Any
tips or tricks? Excel '97 thanks.


Private Sub UpdateExistingRecord()
Dim varExistingRow As Variant

With Worksheets(1).Range("a1:a6500")
Set varExistingRow = .Find(varExistingRecord,
LookIn:=xlFormulas)
If Not varExistingRow Is Nothing Then
MsgBox ("i found it" & varExistingRecord)
Else
MsgBox (" i didn't find!" & varExistingRecord)

End If
End With
End Sub

Thanks, Marcel K.
 

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