Sub test()
With ActiveSheet
For i = 1 To .Pictures.Count
MsgBox .Pictures(i).Name
Next
End With
End Sub
Je suis pourtant icelui (twice)avez vous regardé le code modifié de Staple1600
à celui qui arrive a m'expliquer
Source: Excel 2003 Object Model - RéférenceShape Object and the Shapes Collection
The Shapes collection holds the list of shapes for a sheet.
The Shape object represents a single shape
such as an AutoShape, a free-form shape, an OLE object (like an image), an ActiveX control or a picture.
Possible parent objects of the Shapes collection are the Worksheet and Chart object.
re
bonjour a tous
@job75
et ben non !!!!!!! pas dans mon contexte
sinon je n'aurais pas poser cette question
Cells(i, 2) = ActiveSheet.Pictures(i).Name
Cells(i + 7, 2) = ActiveSheet.Shapes(i).Name
Sub Tests_WTF()
Dim pic, shp As Shape
For Each pic In ActiveSheet.Pictures
pic.BottomRightCell.Offset(, 1) = pic.Name & " <-P"
Next
For Each shp In ActiveSheet.Shapes
'If shp.Type = msoPicture Then
shp.BottomRightCell.Offset(, 2) = shp.Name & " <-S"
'End If
Next
End Sub
Site : https://silkyroad.developpez.com/VBA/FeuilleDeCalcul/#LIII-ACells(i, 2) = ActiveSheet.Pictures(i).Name
Cells(i + 7, 2) = ActiveSheet.Shapes(i).Name
*:deprecated= obsolète (selon mon dictionnairePictures.Insert (deprecated)
In Excel 2007 this method inserts the picture as an embedded object
In Excel 2010 and later this method inserts the picture as a link (be warned)
Re tout le monde,
Comme personne n'a pu me dire en quoi ces deux lignes de code comporte une erreur, les deux retours sont différents.
Je ne dis pas que c'est vrai ou faux, mais tout utilisateur utilisant ces lignes y verra une différence.
D'où le piège.
VB:Cells(i, 2) = ActiveSheet.Pictures(i).Name Cells(i + 7, 2) = ActiveSheet.Shapes(i).Name
Cells(i+ 7, 2) = ActiveSheet.Pictures(i).Name
Cells(i , 2) = ActiveSheet.Shapes(i).Name