Private Sub UserForm_Initialize()
With Sheets("Feuil2")
For Each ctrl In .Shapes
If Left(ctrl.OLEFormat.Object.Name, 5) = "Label" And ctrl.OLEFormat.Object.Visible = True Then
If ctrl.OLEFormat.Object.Object.BackColor = Me.Label1.BackColor Then _
TextRouge = TextRouge & ctrl.OLEFormat.Object.Object.Caption & vbCr
If ctrl.OLEFormat.Object.Object.BackColor = Me.Label2.BackColor Then _
Textjaune = Textjaune & ctrl.OLEFormat.Object.Object.Caption & vbCr
End If
Next ctrl
End With
' *** c'est ici que ça se passe
Me.Label1.Caption = IIf(TextRouge = "", "Néant", TextRouge)
Me.Label2.Caption = IIf(Textjaune = "", "Néant", Textjaune)
End Sub