Ole en vba..?

Fermé
aurel68270 - 6 juin 2012 à 14:31
f894009 Messages postés 17239 Date d'inscription dimanche 25 novembre 2007 Statut Membre Dernière intervention 10 février 2025 - 6 juin 2012 à 14:54
Bonjour,


Je ne comprend pas cette partie d'un algo..
Quelqu'un peu m'aider ?



Dim Sh As Worksheet, S As Shape
For Each Sh In Worksheets
For Each S In Sh.Shapes
If TypeName(S.OLEFormat.Object) = "Picture" Then
S.Delete
End If
Next
Next



Merci :)


1 réponse

f894009 Messages postés 17239 Date d'inscription dimanche 25 novembre 2007 Statut Membre Dernière intervention 10 février 2025 1 713
6 juin 2012 à 14:54
Bonjour,

Dim Sh As Worksheet, S As Shape
'pour chaque onglet dans ce classeur
For Each Sh In Worksheets
'pour chaque Shape dans les objets Shape de l'onglet
For Each S In Sh.Shapes
'si l'objet Shape est de type "Picture" alors delete l'objet
If TypeName(S.OLEFormat.Object) = "Picture" Then
S.Delete
End If
Next
Next


A la traduction pres
0