- Sur feuille
Range("B10:B36000").ClearContents
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
reponse = InputBox("Tu vas te mettre à table !", "SuperRecherche")
Call SearchName(reponse)
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
- Sur module
Sub SearchName(mot)
ligne = 10
For Each ws In Sheets
If ws.Name <> "Feuil1" Then
With ws.Cells
Set c = .Find(mot, LookIn:=xlValues, lookat:=xlPart)
If Not c Is Nothing Then
firstAddress = c.Address
Do
Sheets("Feuil1").Cells(ligne, 2).Select
Selection.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
ws.Name & "!" & c.Address, TextToDisplay:=c.Value
'MsgBox (ws.Name & c.Address)
ligne = ligne + 1
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
trouve = True
End If
End With
End If
Next ws
If Not trouve Then MsgBox ("Nan pas de " & mot & " ici, cherche et trouve aut'chose")
End Sub