Sub 宏1()
For Each shap In Sheet1.Shapes
If shap.Type <> 8 Then shap.Delete
Next shap
For Each Rng In Range([a2], Cells(Application.CountA(Columns(1)), 1))
i = ThisWorkbook.Path & "\7pic\" & Rng & ".png"
Set rngs = Cells(Rng.Row, 2)
Sheet1.Shapes.AddPicture i, True, True, rngs.Left, rngs.Top, rngs.Width, rngs.Height
Next Rng
End Sub
|