Re : lier employé et numéro
bonjour vous tous,
Un petite question relié a ce sujet
Si je veux ajouter un deuxieme listeview relié encore au numéro de permis est ce que le code de Alimente TB serait :
Private Sub AlimenteTb()
Dim Lgn As Range, Bcle&, c As Range, adresse$
Set Lgn = PlageBase(IndexBase, 1)
For Bcle = 1 To ColTb.Count
ColTb(Bcle).Text = Lgn(1, Bcle).Value
Next Bcle
LabIndex = "Fiche " & IndexBase & " sur " & PlageBase.Rows.Count
ListView1.ListItems.Clear
With Sheets("evenement")
Set c = .Columns(1).Find(ColTb(3), lookat:=xlWhole)
If Not c Is Nothing Then
adresse = c.Address
Do
With ListView1
.ListItems.Add , , c
.ListItems(.ListItems.Count).ListSubItems.Add , , c.Offset(, 1)
.ListItems(.ListItems.Count).ListSubItems.Add , , c.Offset(, 2)
Set Lgn = PlageBase(IndexBase, 1)
End With
For Bcle = 1 To ColTb.Count
ColTb(Bcle).Text = Lgn(1, Bcle).Value
Next Bcle
LabIndex = "Fiche " & IndexBase & " sur " & PlageBase.Rows.Count
ListView2.ListItems.Clear
With Sheets("assiduite")
Set c = .Columns(1).Find(ColTb(3), lookat:=xlWhole)
If Not c Is Nothing Then
adresse = c.Address
With Sheets("assiduite")
Set c = .Columns(1).Find(ColTb(3), lookat:=xlWhole)
If Not c Is Nothing Then
adresse = c.Address
Set c = .Columns(1).Find(ColTb(3), lookat:=xlWhole)
If Not c Is Nothing Then
adresse = c.Address
Do
With ListView2
.ListItems.Add , , c
.ListItems(.ListItems.Count).ListSubItems.Add , , c.Offset(, 1)
.ListItems(.ListItems.Count).ListSubItems.Add , , c.Offset(, 2)
End With
Set c = .Columns(1).FindNext(c)
Loop While Not c Is Nothing And c.Address <> adresse
End If
End If
End With
End If
End With
End Sub
merci de votre aide