Sub aa()
Dim S As Shape
Dim R As Range
For Each S In ActiveSheet.Shapes
If S.Type = msoPicture Then
Set R = S.TopLeftCell
Set R = R.Offset(0, -1)
S.Name = R
End If
Next S
End Sub
pourrais je avoir l'adaptation pour uniquement la plage B3:B157
Sub nomimage()
Dim S As Shape, R As Range
For Each S In ActiveSheet.Shapes
Set R = S.TopLeftCell
If Not Intersect([B3:B157], R) Is Nothing And R.Offset(, 1) <> "" Then S.Name = R.Offset(, 1)
Next
End Sub
Une Shape sera renommée si sa TopLeftCell est bien dans B3:B157, un petit déplacement de l'image peut la mettre en dehors...
re
bonjour
uniquement les shapes qui sont dans B3:B157
VB:
Sub aa()
Dim S As Shape, R As Range
For Each S In ActiveSheet.Shapes
If S.Type = msoPicture Then
Set R = S.TopLeftCell.Offset(0, -1)
If Not Intersect([B3:B157], R) Is Nothing Then S.Name = R
End If
Next S
End Sub
Sub nomimage()
Dim S As Shape, R As Range
For Each S In ActiveSheet.Shapes
Set R = S.TopLeftCell
If Not Intersect([B3:B157], R) Is Nothing And R.Offset(, 1) <> "" Then S.Name = R.Offset(, 1)
Next
End Sub
Une Shape sera renommée si sa TopLeftCell est bien dans B3:B157, un petit déplacement de l'image peut la mettre en dehors...