Je me suis finalement decide à lié les cb en faisant
Private Sub cb2_Change()
cb129.Value = cb2.Value
End Sub
peut etre la facon la plus rapide de faire tous les liens , mais ça fonctionne.
Mon souci reste de pouvoir verrouiller toutes les cellules seule la colonne "D" pouvant etre modifiable.
Ma question est donc : N'est -il pas possible dans le code suivant de n'effacer que la colonne "D" ?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'
iFlag1 = Range("D200").End(xlUp).Row
If iFlag1 < 5 Then Exit Sub
iFlag2 = Target.Row
'
'on clique sur une opération pour l'éliminer
If Not Application.Intersect(Target, Range("D5:D" & iFlag1)) Is Nothing Then
'
iRéponse = MsgBox("Êtes-vous certain de vouloir supprimer cette opération ?", vbYesNo)
'
If iRéponse = 6 Then 'Oui
Application.ScreenUpdating = False
Range("d" & iFlag2 & ":f" & iFlag2).Delete shift:=xlUp
Range("f" & iFlag1 & ":f" & iFlag1).Insert shift:=xlDown
Application.ScreenUpdating = True
End If
Exit Sub
End If
'
'on clique en-dessous de la dernière opération pour en ajouter une nouvelle
If Not Application.Intersect(Target, Range("D" & iFlag1 + 1)) Is Nothing Then
For x = 1 To 190
UsfPreparation.Controls("Cb" & x).Value = False
UsfPreparation.Controls("Cb" & x).Enabled = True
For y = 5 To iFlag1
If Range("D" & y).Value = UsfPreparation.Controls("Cb" & x).Caption Then
UsfPreparation.Controls("Cb" & x).Value = True
UsfPreparation.Controls("Cb" & x).Enabled = False
End If
Next
Next
'
UsfPreparation.Show modal1
'
Range("A1").Select
End If
'
End Sub
J'ai essayer mais je ne trouve pas la solution !
Merci d'avance