Bonjour cher (e) excellien (ne),
J,ai récupéré une formule de grenier a Thierry (2005) j'aimerais pourvoir l'adapté a ma feuille. Pourriez-vous me fournir les explication SVP.
voici la formule:
ICI C'est le Moteur de Recherche
Private Sub CommandButton1_Click()
Dim C As Range
Dim Tablo() As String
Dim Text As String
Dim S As Byte
Dim Firstaddress As String
Dim i As Integer, X As Integer, L As Integer
Text = Me.TextBox1
If Text = "" Then Exit Sub
For S = 1 To Worksheets.Count
If Worksheets(S).Name <> "Matrice" Then
With Sheets(S).UsedRange
Set C = .Find(Text, LookIn:=xlValues, LookAt:=xlPart)
If Not C Is Nothing Then
Firstaddress = C.Address
Do
ReDim Preserve Tablo(8, i)
For X = 1 To 6
Tablo(X - 1, i) = C.Offset(0, X - C.Column).Text
Next X
Tablo(6, i) = Sheets(S).Name
Tablo(7, i) = C.Address(0, 0)
i = i + 1
Set C = .FindNext(C)
Loop While Not C Is Nothing And C.Address <> Firstaddress
End If
End With
End If
Next S
If i = 0 Then
MsgBox "Le Texte " & Text & " n'a pas été trouvé" & vbCrLf & "Faites un essai sur une partie du nom", vbCritical, Sign
Exit Sub
End If
Me.ListBox1.Column() = Tablo()
End Sub
je comprends que la formule récupère le texte et certaine donnée dans plusieurs feuille. Par contre j'aimerais récupérer les lignes impliquant le mot recherché sur toute la feuille "sheet2" entre les colonne A1:Y60000.
merci de vos explication
J,ai récupéré une formule de grenier a Thierry (2005) j'aimerais pourvoir l'adapté a ma feuille. Pourriez-vous me fournir les explication SVP.
voici la formule:
ICI C'est le Moteur de Recherche
Private Sub CommandButton1_Click()
Dim C As Range
Dim Tablo() As String
Dim Text As String
Dim S As Byte
Dim Firstaddress As String
Dim i As Integer, X As Integer, L As Integer
Text = Me.TextBox1
If Text = "" Then Exit Sub
For S = 1 To Worksheets.Count
If Worksheets(S).Name <> "Matrice" Then
With Sheets(S).UsedRange
Set C = .Find(Text, LookIn:=xlValues, LookAt:=xlPart)
If Not C Is Nothing Then
Firstaddress = C.Address
Do
ReDim Preserve Tablo(8, i)
For X = 1 To 6
Tablo(X - 1, i) = C.Offset(0, X - C.Column).Text
Next X
Tablo(6, i) = Sheets(S).Name
Tablo(7, i) = C.Address(0, 0)
i = i + 1
Set C = .FindNext(C)
Loop While Not C Is Nothing And C.Address <> Firstaddress
End If
End With
End If
Next S
If i = 0 Then
MsgBox "Le Texte " & Text & " n'a pas été trouvé" & vbCrLf & "Faites un essai sur une partie du nom", vbCritical, Sign
Exit Sub
End If
Me.ListBox1.Column() = Tablo()
End Sub
je comprends que la formule récupère le texte et certaine donnée dans plusieurs feuille. Par contre j'aimerais récupérer les lignes impliquant le mot recherché sur toute la feuille "sheet2" entre les colonne A1:Y60000.
merci de vos explication