Sub vider()
[COLOR="Red"]Range("B10:C11,G10:H11,L10:N11,I5:K6").ClearContents[/COLOR]
End Sub
'-------------------------------------------
Sub effacer()
[COLOR="Red"]ActiveSheet.Unprotect
Range("C15:D24,N15:O24").ClearContents
ActiveSheet.Protect[/COLOR]
End Sub
'-------------------------------------------
Sub placer_infos()
derligne = Range("C65536").End(xlUp).Row
[COLOR="Red"]Application.ScreenUpdating = False[/COLOR]
If derligne < 15 Then
derligne = 15
[COLOR="Red"]ActiveSheet.Unprotect
Range("C" & derligne & ":D" & derligne).Locked = False[/COLOR]
Cells(derligne, 3).Value = Cells(5, 9).Value
Cells(derligne, 4).Value = Cells(17, 7).Value
[COLOR="Red"]Range("C" & derligne & ":D" & derligne).Locked = True
ActiveSheet.Protect[/COLOR]
Exit Sub
End If
If derligne < 24 Then
[COLOR="Red"]ActiveSheet.Unprotect
Range("C" & derligne & ":D" & derligne).Locked = False[/COLOR]
Cells(derligne + 1, 3).Value = Cells(5, 9).Value
Cells(derligne + 1, 4).Value = Cells(17, 7).Value
[COLOR="Red"]Range("C" & derligne & ":D" & derligne).Locked = True
ActiveSheet.Protect[/COLOR]
Exit Sub
End If
If derligne >= 24 Then
derligne = Range("N65536").End(xlUp).Row
If derligne < 15 Then
derligne = 15
[COLOR="Red"]ActiveSheet.Unprotect
Range("N" & derligne & ":O" & derligne).Locked = False[/COLOR]
Cells(derligne, 14).Value = Cells(5, 9).Value
Cells(derligne, 15).Value = Cells(17, 7).Value
[COLOR="Red"]Range("N" & derligne & ":O" & derligne).Locked = True
ActiveSheet.Protect[/COLOR]
Exit Sub
End If
If derligne < 24 Then
[COLOR="Red"]ActiveSheet.Unprotect
Range("N" & derligne & ":O" & derligne).Locked = False[/COLOR]
Cells(derligne + 1, 14).Value = Cells(5, 9).Value
Cells(derligne + 1, 15).Value = Cells(17, 7).Value
[COLOR="Red"]Range("N" & derligne & ":O" & derligne).Locked = True
ActiveSheet.Protect[/COLOR]
Exit Sub
End If
If derligne > 24 Then
Exit Sub
End If
End If
[COLOR="Red"]Application.ScreenUpdating = True[/COLOR]
End Sub