Sub modifactif(grade, datee, adresse, cp, ville, telfixe, telpro, telport, mail, nom)
'modification de la feuille effectif_actifs
Sheets("effectif_actifs").Activate
With UserForm3.ComboBox1
If .ListIndex <> -1 Then
Cells(.ListIndex + 5, 3).Value = grade
Cells(.ListIndex + 5, 4).Value = datee
Cells(.ListIndex + 5, 5).Value = adresse
Cells(.ListIndex + 5, 6).Value = cp
Cells(.ListIndex + 5, 7).Value = ville
Cells(.ListIndex + 5, 9).Value = telfixe
Cells(.ListIndex + 5, 11).Value = telpro
Cells(.ListIndex + 5, 10).Value = telport
Cells(.ListIndex + 5, 12).Value = mail
End If
End With
'modification de la feuille effectif_amicale
'For effami = 5 To 10000
'If Sheets("effectif_amicale").Cells(effami, 1).Value = ActiveSheet.Range("B5").Value Then GoTo er1
'Next effami
Sheets("effectif_amicale").Activate
With UserForm3.ComboBox1
If .ListIndex <> -1 Then
Cells(.ListIndex + 5, 3).Value = grade
Cells(.ListIndex + 5, 4).Value = datee
Cells(.ListIndex + 5, 5).Value = adresse
Cells(.ListIndex + 5, 6).Value = cp
Cells(.ListIndex + 5, 7).Value = ville
Cells(.ListIndex + 5, 9).Value = telfixe
Cells(.ListIndex + 5, 11).Value = telpro
Cells(.ListIndex + 5, 10).Value = telport
End If
End With
'modification de la feuille manifestation
Sheets("manifestation").Activate
With UserForm3.ComboBox1
If .ListIndex <> -1 Then
Cells(.ListIndex + 11, 3).Value = grade
Cells(.ListIndex + 11, 5).Value = telfixe
Cells(.ListIndex + 11, 6).Value = telpro
Cells(.ListIndex + 11, 7).Value = telport
End If
End With
'modification de la feuille emargements
Sheets("emargements").Activate
With UserForm3.ComboBox1
If .ListIndex <> -1 Then
Cells(.ListIndex + 6, 3).Value = grade
End If
End With
'modification de la feuille emargements_amicale
Sheets("emargements_amicale").Activate
Dim x As Range
'recherche dans la colonne B de la feuille active
Set x = Columns(2).Find(UserForm3.ComboBox1.Value, , xlValues, xlWhole, , , False)
'si trouvé
If Not x Is Nothing Then
x.Offset(0, 1).Value = grade ' renvoie dans cellule, décalage de 1 colonne à droite
' x.Offset(0, 2).Value = "bbb" ' renvoie dans cellule, décalage de 2 colonnes à droite
End If
'With UserForm3.ComboBox1
' If .ListIndex <> -1 Then
' Cells(.ListIndex + 6, 3).Value = grade
' End If
'End With
'modification de la feuille vacances
Sheets("vacances").Activate
With UserForm3.ComboBox1
If .ListIndex <> -1 Then
Cells(.ListIndex + 9, 3).Value = grade
End If
End With
'modification de la feuille publipostage-actifs
Sheets("publipostage-actifs").Activate
Dim y As Range
'recherche dans la colonne A de la feuille active
Set y = Columns(1).Find(UserForm3.ComboBox1.Value, , xlValues, xlWhole, , , False)
'si trouvé
If Not y Is Nothing Then
y.Offset(0, 1).Value = grade ' renvoie dans cellule, décalage de 1 colonne à droite
y.Offset(0, 2).Value = datee ' renvoie dans cellule, décalage de 2 colonnes à droite
y.Offset(0, 3).Value = adresse
y.Offset(0, 4).Value = cp
y.Offset(0, 5).Value = ville
End If
'With UserForm3.ComboBox1
' If .ListIndex <> -1 Then
' Cells(.ListIndex + 2, 2).Value = grade
' Cells(.ListIndex + 2, 3).Value = datee
' Cells(.ListIndex + 2, 4).Value = adresse
' Cells(.ListIndex + 2, 5).Value = cp
' Cells(.ListIndex + 2, 6).Value = ville
' End If
'End With
End Sub