Private Sub CBok_Click()
Dim derlign As Long
With Worksheets(1)
On Error Resume Next
derlign = .Cells.Find(What:="*", _
After:=sh.Range("A1"), _
Lookat:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Row
On Error GoTo 0
derlign = derlign + 1
.Cells(derlign, 1).Value = CBclient.Value 'Nom du client
.Cells(derlign, 2).Value = TBcodearticle.Value 'Code article
.Cells(derlign, 3).Value = TBof.Value 'of
.Cells(derlign, 4).Value = TBind.Value 'Désignation
''''''''''''''''''''''''''''Choix du setceur''''''''''''''''''''''''''''''
If OBstructure.Value = True Then
.Cells(derlign, 5) = OBstructure.Caption
End If
If OBmecanosoude.Value = True Then
.Cells(derlign, 5) = OBmecanosoude.Caption
End If
If OBchaudronnerie.Value = True Then
.Cells(derlign, 5) = OBchaudronnerie.Caption
End If
''''''''''''''''''''''''''''Choix du type d'opération(s)'''''''''''''''''''''
Dim i
For i = 9 To 16
If Me.Controls("CheckBox" & i) Then
.Cells(derlign, 6) = Me.Controls("CheckBox" & i).Caption
derlign = derlign + 1
End If
Next i
' If Me.Controls("CheckBox" & i) Then .Cells(derlign, 6) = Me.Controls("CheckBox" & i).Caption
' derlign = derlign + 1
'Next i
End With
End Sub