1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
| Private Sub Cbt_ajouter_Click()
With Sheets("INSCRIPTION").Range("A1").End(xlDown).Offset(1, 0)
.Value = Cbclub.Value
.Offset(0, 1).Value = Textenom.Value & " " & Texteprenom.Value
.Offset(0, 2).Value = textelicence.Value
.Offset(0, 3).Value = Textenom.Value
.Offset(0, 4).Value = Texteprenom.Value
.Offset(0, 5).Value = Textedate.Value
.Offset(0, 6).Value = texte_aller_ufolep.Value
.Offset(0, 7).Value = texte_retour_ufolep.Value
.Offset(0, 8).Value = Texte_Aller_FFTT.Value
.Offset(0, 9).Value = Texte_Retour_FFTT.Value
.Offset(0, 10).Value = Texte_club_FFTT.Value
.Offset(0, 11).Value = Cbxmute.Value
.Offset(0, 12).Value = cbxsecteur.Value
.Offset(0, 13).Value = "Modifier"
End With
' Tri
Range("A2:O3000").Select
ActiveWorkbook.Worksheets("Inscription").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Inscription").Sort.SortFields.Add Key:=Range("A2") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("Inscription").Sort.SortFields.Add Key:=Range("D2") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("Inscription").Sort.SortFields.Add Key:=Range("E2") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Inscription").Sort
.SetRange Range("A2:O3000")
' .Header = xlGuess
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Unload Me
End Sub
Private Sub userform_initialize()
Cbxmute = ""
If Lalig > 0 Then
With Worksheets("BDD")
Me.Cbclub.Value = .Range("A" & Lalig)
Me.textelicence.Value = .Range("C" & Lalig)
Me.Textenom.Value = .Range("D" & Lalig)
Me.Texteprenom.Value = .Range("E" & Lalig)
Me.Textedate.Value = .Range("F" & Lalig)
Me.texte_aller_ufolep.Value = .Range("G" & Lalig)
Me.texte_retour_ufolep.Value = .Range("H" & Lalig)
Me.Texte_Aller_FFTT.Value = .Range("I" & Lalig)
Me.Texte_Retour_FFTT.Value = .Range("J" & Lalig)
Me.Texte_club_FFTT.Value = .Range("K" & Lalig)
Me.Cbxmute.Value = .Range("L" & Lalig)
Me.cbxsecteur.Value = .Range("M" & Lalig)
End With
End If
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
Lalig = 0
End Sub |
Partager