|
- Sub d()
- Dim arr(), shp As Shape
- arr = Sheet1.Range("a1").CurrentRegion
- For Each shp In Sheet1.Shapes
- shp.Delete
- Next
- On Error Resume Next
- For i = 2 To UBound(arr)
- If arr(i, 2) <> "" Then
- Set shp = Sheet1.Shapes.AddPicture(ThisWorkbook.Path & "\pic" & arr(i, 2) & ".jpg", msoFalse, msoTrue, Sheet1.Range("c" & i).MergeArea.Left, Sheet1.Range("c" & i).MergeArea.Top, Sheet1.Range("c" & i).MergeArea.Width, Sheet1.Range("c" & i).MergeArea.Height)
- shp.Placement = xlMoveAndSize
- End If
- Next
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|