"Find" Macro not working for some

R

Riz

Hi,

I have created a button in the excel spread sheet
for "Find" or "Search. This is the code:

Sub Find()
Range("A2:F37").Select
Cells.Find(What:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Activate
Application.Dialogs(xlDialogFormulaReplace).Show
End Sub

It works fine for me, however when I send it out to
everyone else they are not able to make it work. It opens
the VB Code window. Is there something I can do to just
this spreadsheet so they dont have to change the macro
setting and the search button actaully searchs instead of
openeing the code window?

Thanks for youe help.

Riz
 
T

Tom Ogilvy

Sub Find()
On Error Resume Next
Range("A2:F37").Select
Cells.Find(What:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Activate
Application.Dialogs(xlDialogFormulaReplace).Show
On Error goto 0
End Sub

Although you macro requires the user to select the cell containing the value
to be searched for before running the macro. Perhaps they are not doing
that.
 
Top