- 帖子
- 1572
- 主題
- 16
- 精華
- 2
- 積分
- 1521
- 點名
- 0
- 作業系統
- xp
- 軟體版本
- office 2003
- 閱讀權限
- 150
- 性別
- 男
- 註冊時間
- 2010-5-1
- 最後登錄
- 2016-1-13

|
本帖最後由 oobird 於 2012-5-4 00:30 編輯
- Private Sub CommandButton1_Click()
- Dim shp As Shape, c As Range
- On Error Resume Next
- For Each shp In ActiveSheet.Shapes
- If Not shp.Type = 12 Then shp.Delete
- Next
- For Each c In Range("b2", [b65536].End(3))
- On Error Resume Next
- c(1, 2).Select
- Set p = ActiveSheet.Pictures.Insert(ThisWorkbook.Path & "\TEST16\" & c & ".gif")
- With p
- .Name = c.Value
- .Height = c(1, 2).Height
- .Width = c(1, 2).Width
- .Placement = xlMoveAndSize
- End With
- Next
- End Sub
複製代碼 |
|