Salut Dark Gandolf,
voici une première version de ton fichier!
Je me suis permis de changer ton magnifique petit bouton bleu en un tout aussi magnifique gros bouton bleu... mais ActiveX!
Je ne m'en sors pas trop bien avec les autres!
Ce qui implique que, pour l'heure, la recherche de plans ne pourra être initiée que depuis 'ACCUEIL PRINCIPES".
Même principe, une Inputbox te demande le n° de plan et le résultat de la recherche est affiché dans une ListBox à côté du bouton.
Un clic sur la référence dans la ListBox active la feuille à la ligne souhaitée.
Si, comme je le suppose mais n'en suis pas certain, les numéros de plan sont, à coup sûr, UNIQUES, je peux amputer la macro de quelques lignes et t'envoyer directement à l'endroit voulu en zappant la ListBox!
Dim wks As Worksheet
Dim tTab, tPlan()
Dim sPlan As String
Dim iRow, iPlan, x As Integer
'
Set wks = Worksheets("Accueil principes")
'
sPlan = CStr(InputBox("Numéro de plan à chercher :", "Moteur de recherche", "Exemple: 221500"))
If sPlan = "" Then
MsgBox "Vous devez encoder un numéro de plan pour valider la recherche!", vbCritical, "Recherche"
Exit Sub
Else
For Each wks In Worksheets
If wks.name <> "Accueil principes" Then
With wks
iRow = .Range("K" & Rows.Count).End(xlUp).Row
If iRow >= 11 Then
tTab = .Range("K11:K" & iRow + 1)
For x = 1 To UBound(tTab)
If CStr(tTab(x, 1)) = sPlan Then
iPlan = iPlan + 1
ReDim Preserve tPlan(3, iPlan)
tPlan(0, iPlan - 1) = .name
tPlan(1, iPlan - 1) = .Range("N" & x + 10).Value
tPlan(2, iPlan - 1) = "Ligne : " & x + 10
Exit For
End If
Next
End If
End With
End If
Next
If iPlan = 0 Then
MsgBox "Numéro de plan inexistant !", vbInformation, "Recherche"
Else
Me.lstPlan.List = WorksheetFunction.Transpose(tPlan)
Me.lstPlan.ColumnWidths = "75;425;50"
Me.lstPlan.Height = IIf(iPlan = 1, 50, iPlan * 15)
Me.lstPlan.Visible = True
End If
End If
https://www.cjoint.com/c/GBmammMMQSg
Bon travail!
A+