Deleting pictures with Excel VBA

后端 未结 3 1128
鱼传尺愫
鱼传尺愫 2021-01-17 13:46

How do I delete all the pictures in an Excel 2007 worksheet? A working code example would be great.

3条回答
  •  花落未央
    2021-01-17 14:21

    The simplest way:

    Activesheet.Pictures.Delete
    

    or

    Activesheet.Shapes.Delete
    

    Depending on the type of object your picture is.

    Deletes all pictures with greater efficiency then iterating (looping through) and deleting them one by one.

提交回复
热议问题