返回列表 上一主題 發帖

[發問] VBA清除圖片問題

回復 1# pinkytortoise
  1. Sub Ex()
  2.     Sheets("尺寸檢驗").Select
  3.     ActiveSheet.Unprotect
  4.     For Each I In ActiveSheet.Shapes
  5.     If I.Type = msoPicture Then I.Delete
  6.     Next
  7.     ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
  8. End Sub
  9. Sub Ex1()
  10.     With Sheets("尺寸檢驗")
  11.         .Unprotect
  12.         For Each I In .Shapes
  13.             If I.Type = msoPicture Then I.Delete
  14.         Next
  15.         .Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
  16.     End With
  17. End Sub
複製代碼

TOP

        靜思自在 : 愛不是要求對方,而是要由自身的付出。
返回列表 上一主題