Salut à tous,
j'ai chopé dans les archives ce ptit bout de code
il fonctionne bien mais si quelqu'un pouvait m'expliquer un peu son fonctionnement ? Ca serait vraiment sympas
merci d'avance
j'ai chopé dans les archives ce ptit bout de code
Code:
Private Sub CommandButton5_Click()
Dim j, K As Integer
Dim firstAddress, C
j = 1
K = 1
Do
j = j + 1
Loop Until Application.CountA(Cells(j, 1).EntireRow) = 0
If Recherche1.Value = '' Then Exit Sub
Application.ScreenUpdating = False
Set C = Feuil2.Columns('B:B').Find(What:=(Recherche1.Value), LookAt:=xlWhole)
If Not C Is Nothing Then
firstAddress = C.Address
Do
K = K + 1
C.EntireRow.Copy Feuil1.Range('A' & K, 'G' & K)
j = j + 1
Set C = Feuil2.Columns('B:B').FindNext(C)
Loop While Not C Is Nothing And C.Address <> firstAddress
End If
Feuil1.Range('A1').Activate
Application.ScreenUpdating = True
End Sub
merci d'avance