Thread: VBA Find Bug
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
jlclyde jlclyde is offline
external usenet poster
 
Posts: 410
Default VBA Find Bug

In a user form I am trying to find the text 1234. As soon as it gets
to the find line it bugs out. Any ideas?

Private Sub Enter_Click()
If DtBx = "" And ItemNum = "" Then
MsgBox "Must Enter Item Number"
ElseIf DtBx = "" Then
Cells.Find(What:="1234", After:=ActiveCell, LookIn:=xlValues,
LookAt:= _
xlWhole, SearchOrder:=xlByColumns,
SearchDirection:=xlPrevious, MatchCase:= _
False, SearchFormat:=False).Activate
End If
End Sub
Thanks,
Jay