bonsoir
disposant du code suivant :
dans la partie feuille :"BATEAUX AVALANTS"
Private Sub CommandButton1_Click()
reponse = InputBox("mot a chercher")
Range("A31:A" & Range("A65536").End(xlUp).Row).ClearContents
Call recherche(reponse)
End Sub
dans la partie module :
Sub recherche(mot)
On Error GoTo fin
ligne = 31
For Each ws In Sheets
If ws.Name <> "BATEAUX AVALANTS" Then
With ws.Cells
Set c = .Find(mot, LookIn:=xlValues, lookat:=xlPart)
If Not c Is Nothing Then
firstAddress = c.Address
Do
Sheets("BATEAU AVALANTS").Cells(ligne, 6).Select
Selection.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
ws.Name & "!" & c.Address, TextToDisplay:=c.Value
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 ("Pas de " & mot & " trouvé dans ce fichier")
fin:
End Sub
le debogage signal une anomalie sur cette ligne :
Range("A31:A" & Range("A65536").End(xlUp).Row).ClearContents
je n'arrive pas à corriger
merci de m'aider à voir , j'ai pas mal essayé sans succès