Private Sub rechbtn_Click()
Dim rPlage As Range, rCell As Range
With Sheets("liste adhérents").Range("a3:a10000")
Set rCell = .Find(txtrecherche, , xlValues, xlWhole)
If Not rCell Is Nothing Then
txtnom = rCell.Offset(0, 40) 'Rajoutée à la fin colonnes Nom et Prénom (manquantes)
txtprenom = rCell.Offset(0, 41)
txtdate = Format(CDate(Date), "dd.mm.yyyy")
Else
txtnom = ""
txtprenom = ""
txtdate = ""
MsgBox "Ce nom n'existe pas."
End If
End With
End Sub
Private Sub save_btn_Click()
Dim i As Long, lig As Integer
For i = 4 To ThisWorkbook.Sheets.Count
If presentbtn.Value = True Then
With Sheets(i)
lig = .Range("a65536").End(xlUp).Row + 1
.Cells(lig, 1).Value = txtnom.Value
.Cells(lig, 2).Value = txtprenom.Value
.Cells(lig, 3).Value = "Présent"
End With
End If
If absentbtn.Value = True Then
With Sheets(i)
lig = .Range("a65536").End(xlUp).Row + 1
.Cells(lig, 1).Value = txtnom.Value
.Cells(lig, 2).Value = txtprenom.Value
.Cells(lig, 3).Value = "Absent"
End With
End If
Next i
Unload Me
End Sub