Bonjour à tous
j'ai un code vba que je voudrai comprendre et que j'aimerai qu'on me traduise.
existe-t'il un logiciel pour cet usage.
Je joins en attendant ce code pour traduction.
Merci pour votre aide
Bob
j'ai un code vba que je voudrai comprendre et que j'aimerai qu'on me traduise.
existe-t'il un logiciel pour cet usage.
Je joins en attendant ce code pour traduction.
Code:
Private Sub T1_Change()
Dim i&, aa, a&, bb, y&, sh, cc
If T1 = "" Then L1.Clear: Label2 = "": Exit Sub
y = 1
ReDim bb(4, y)
For Each sh In Worksheets
With sh
aa = .Range("A2:E" & .Range("A" & Rows.Count).End(xlUp).Row)
For i = 1 To UBound(aa)
If aa(i, 1) Like T1 & "*" Then
ReDim Preserve bb(4, y)
bb(1, y) = aa(i, 1): bb(2, y) = aa(i, 2): bb(3, y) = aa(i, 4): y = y + 1
End If
Next i
End With
Next sh
If y = 1 Then Exit Sub
If y = 2 Then
ReDim cc(1, 3)
cc(1, 1) = bb(1, 1): cc(1, 2) = bb(2, 1): cc(1, 3) = bb(3, 1)
L1.List = cc
Else
L1.List = Application.Transpose(bb)
End If
If y = 2 Then
Label2 = "Vous avez trouvé " & y - 1 & " ligne avec la recherche " & T1
Else
Label2 = "Vous avez trouvé " & y - 1 & " lignes avec la recherche " & T1
End If
L1.ColumnCount = 3
L1.ColumnWidths = "280;280;80"
End Sub
Merci pour votre aide
Bob