Sub Transfert(vLign As Long)
Dim i As Byte, Droits As Byte
Droits = 0
With ActiveSheet
.Unprotect
.Cells(vLign, 1) = CLng(Label2)
.Cells(vLign, 2) = UCase(TextBox1)
.Cells(vLign, 3) = Application.Proper(TextBox2)
If IsDate(TextBox3) Then .Cells(vLign, 4) = CDate(TextBox3) Else: .Cells(vLign, 4) = ""
If IsDate(TextBox3) Then .Cells(vLign, 5) = CLng(TextBox4) Else: .Cells(vLign, 5) = ""
.Cells(vLign, 6) = ComboBox1
.Cells(vLign, 7) = UCase(TextBox5)
If IsDate(TextBox6) Then .Cells(vLign, 8) = CDate(TextBox6) Else: .Cells(vLign, 8) = ""
.Cells(vLign, 9) = ComboBox2
.Cells(vLign, 10) = ComboBox3
.Cells(vLign, 11) = ComboBox4
.Cells(vLign, 12) = ComboBox5
.Cells(vLign, 13) = TextBox7
.Cells(vLign, 14) = TextBox8
For i = 1 To 5
If Controls("CheckBox" & i) Then
.Cells(vLign, i + 14) = 1
Droits = 1 '<--------
Else
.Cells(vLign, i + 14) = ""
End If
Next
If IsDate(TextBox9) Then .Cells(vLign, 20) = CDate(TextBox9) Else: .Cells(vLign, 20) = ""
If IsDate(TextBox10) Then .Cells(vLign, 21) = CDate(TextBox10) Else: .Cells(vLign, 21) = ""
.Cells(vLign, 22) = ComboBox10
.Cells(vLign, 23) = ComboBox11
If IsDate(TextBox11) Then .Cells(vLign, 24) = CDate(TextBox11) Else: .Cells(vLign, 22) = ""
.Cells(vLign, 25) = ComboBox6
.Cells(vLign, 26) = ComboBox7
.Cells(vLign, 27) = ComboBox8
.Cells(vLign, 28) = ComboBox9
.Cells(vLign, 29) = Droits
.Protect
End With
End Sub