| 12
 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
 
 |  
Private Sub CommandButton1_Click()
 
Dim y As Long
Dim b As Boolean
 
  With Worksheets("BDD").Activate
 
    For y = 2 To .Range("A1").CurrentRegion.Rows.Count
      b = Me.ComboBox2.Value = .Cells(y, "B").Value
 
              If CheckBox1.Value = True Then .Cells(y, 8).Value = "OUI"
'sheets("BDD").Cells(Lg, 22).Value = CDate(UserForm10.DTPicker1.Value)
        .Range(.Cells(y, 1), .Cells(y, 8)).Select
        If CheckBox2.Value = True Then .Cells(y, 8).Value = "ANNULE"
        MsgBox ("Enregistrement effectué")
        'Sheets("SOMMAIRE").Activate
        Exit For
 
 
    Next y
 
    If b Then
      Unload Me
    Else
      MsgBox ("Données non trouvées!!! ")
    'Sheets("SOMMAIRE").Activate
    End If
    End With
    End Sub |