Rapport de message :*
 

Re: Adapter un userform fonction recherche

Titre du sujet : Re: Adapter un userform fonction recherche
par myDearFriend! le 20/11/2011 23:38:14

Bonsoir tactic6, bienvenue sur XLpages.com
Bonsoir le Forum,

A tout hasard, et si j'ai bien compris le sens de ta question, tu peux tester ce qui suit :

EXTRAIT DE LA PROCEDURE CommandButton1_Click() DU USERFORM :

   For Each F In Worksheets
        If F.Name = "Base de données" Or F.Name = "Projets Internes" Then
            With F
                Set Plage = Application.Intersect(.UsedRange.Cells, .Range(.Cells(8, 1), .Cells(.Rows.Count, .Columns.Count)))
            End With
            Set C = Plage.Find(T, LookIn:=xlValues, LookAt:=xlPart)
            If Not C Is Nothing Then
                Firstaddress = C.Address
                Do
                    With ListBox1
                        .AddItem F.Name
                        For x = 2 To 6
                            .List(.ListCount - 1, x - 1) = F.Cells(C.Row, x).Text
                        Next x
                        .List(.ListCount - 1, 6) = C.Address(False, False)
                    End With
                    Set C = Plage.FindNext(C)
                Loop While Not C Is Nothing And C.Address <> Firstaddress
            End If
        End If
    Next F
 

Je t'ai mis en évidence les 2 lignes à ajouter.


Comme tu as pu le voir, le présent sujet est "Résolu", aussi je te remercie de créer ton propre sujet à l'avenir (en faisant référence à celui-ci au besoin).

Cordialement,