Thread: VBA Find Bug
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default VBA Find Bug

Can you describe "bugs out" for us? Do you mean you are getting an error
message? If so, what does it say?

--
Rick (MVP - Excel)


"jlclyde" wrote in message
...
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