View Single Post
  #2   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Cyrille,

Your code works for me. But if you have problems, you can use the find
method:

Sub TryNow()
Dim myCell As Range
Set myCell = Cells.Find(InputBox("What do you want to find"))
If Not myCell Is Nothing Then
MsgBox "That was found in cell " & myCell.Address
End If
End Sub

HTH,
Bernie
MS Excel MVP

"cyrille" wrote in message
...
Hello Everybody,
I have a question concerning the opening of dialogs box. I would like to
open the Search Dialog Box. My stupid code is like this :

Private Sub CommandButtonSearch_Click()
'ouvre la boite de dialogue Rechercher
Application.Dialogs(xlDialogFormulaFind).Show
End Sub

With this code, the problem is that the Search Dialog box is indeed open
but whatever the text to find in the worksheet, there is no result. If I
stop the macro, open by hand the Search Dialog box and type the same
text, it works... Can you help me to solve this problem ?
Thanks a lot in advance.
Cyrille