run macro although blinking cursor is active in an active cell

  • Thread starter Thread starter bartman1980
  • Start date Start date
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
 
Back
Top