• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Delete Picture Help

MWeber2222

New Member
I have developed the attached macro. It works as desired except:
  1. For the "Scanner" Macro, I need a step to delete picture (if one exists on sheet in current state) while leaving other graphic elements in tact
  2. For the "Reset" Macro I need the same functionality as #1
I have tried a few different methods of achieving this, but without success.

I would also be interested in:
  • Being able to center justify each image in the allotted space
I appreciate any help that might be offered.

Thanks!
M. Weber
 

Attachments

  • Scanner_VBA 3_TEST9.xlsm
    30.9 KB · Views: 2
Try adding this where you are deleting picture:-

For Each sPic In ActiveSheet.Shapes
If InStr(1, sPic.Name, "picname") <> 0 Then pic.Delete
Next sPic
Derek
 
Derek,

Thank you for the response. I copied your code and added it to the beginning of the Scanner Macro, and also at the end of the Reset Macro, however the picture(s) still do not delete when running either macro.

Regards,
M. Weber
 
Back
Top