j'aimerais savoir ce qu'il y a d'anormal dans mon code pour enlever tous les pictures box qui n'ont pas les noms que j'ai inscrit.
'Dim mycontrol As Control
For Each mycontrol In Me.Controls.Count
If TypeOf mycontrol Is VB.PictureBox Then
If mycontrol.Name <> "pctHautCentre" And _
mycontrol.Name <> "pctHautDroit" And _
mycontrol.Name <> "pctBasGauche" And _
mycontrol.Name <> "pctBasCentre" And _
mycontrol.Name <> "pctBasDroit" Then
Set mycontrol = Nothing
End If
End If
Next mycontrol