run macro although blinking cursor is active in an active cell

B

bartman1980

Hi there,
Can you run a macro although the cursor is blinking in an active cell?

I made this very simple search macro, but the user has to get out of
the cell before the macro can run.
Can this be solved?

Sub search()
Cells.Find(What:=Range("B5"), After:=ActiveCell, LookIn:=xlValues,
LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False) _
.Activate
End Sub
 

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