Sub recherche()
nom = InputBox("A rechercher", "Recherche")
If nom = "" Then Exit Sub
For k = 1 To Sheets.Count
With Sheets(k).UsedRange
Set c = .Find(nom, LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
Sheets(k).Select
c.Activate
rep = MsgBox("Continuer la recherche ?", 4 + 32, "Sélection")
If rep = vbNo Then Exit Sub
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
Next
MsgBox "Recherche terminée!"
End Sub
Private Sub Workbook_Open()
Set c = [A1].Find(what:="Zaza", LookIn:=xlValues, lookat:=xlWhole, _
searchorder:=xlByColumns, searchdirection:=xlNext, MatchCase:=False)
' afficher la boite
Application.CommandBars.FindControl(ID:=1849).Execute
End Sub
Sub test()
Application.CommandBars.FindControl(ID:=1849).Execute
CreateObject("wscript.shell").SendKeys ("zaza")
End Sub
Sub test()
Application.CommandBars.FindControl(ID:=1849).Execute
CreateObject("wscript.shell").SendKeys ("zaza")
CreateObject("wscript.shell").SendKeys ("{Tab}{Tab}{down}{down}{Enter}")
End Sub
Private Sub Workbook_Open()
Application.Dialogs(xlDialogFormulaReplace).Show "zaza", "toto", 2
End Sub