こんな風なことになるかと思います。
Sub 写真自動配置()
Dim targetRange As Range
Dim i As Long
Dim shp As Shape
With ActiveSheet.Pictures
.ShapeRange.LockAspectRatio = msoFalse
.Width = 234
.Height = 170
End With
i = 0
For Each shp In ActiveSheet.Shapes
If shp.Type = msoPicture Then
i = i + 1
Set targetRange = Cells(i, 2)
With shp
.Left = targetRange.Left
.Top = targetRange.Top
End With
End If
Next
End Sub
ダイレクトにPictureだけを相手にしたほうが得策かもしれません。
Picture(s)はオブジェクトブラウザーなどでは非表示オブジェクトになっていて、
重要性は低下しているものかもしれませんが、
Excel2003では堂々と使ってよいものかもしれません。
こんな風に書けます。
Sub 写真自動配置2()
Dim targetRange As Range
Dim k As Long
With ActiveSheet.Pictures
.ShapeRange.LockAspectRatio = msoFalse
.Width = 234
.Height = 170
End With
For k = 1 To ActiveSheet.Pictures.Count
Set targetRange = Cells(k, 2)
With ActiveSheet.Pictures(k)
.Left = targetRange.Left
.Top = targetRange.Top
End With
Next
End Sub