+ Reply to Thread
Results 1 to 26 of 26

invisible AutoShapes and images are driving me insane, please help me delete them

  1. #1
    Registered User
    Join Date
    02-14-2024
    Location
    NJ
    MS-Off Ver
    365
    Posts
    7

    invisible AutoShapes and images are driving me insane, please help me delete them

    I have joined this forum just to ask this one question that googling has not been able to answer for me:

    I have many excel docs that contain exported information from our ERP system that contain literally hundreds of, if not more, invisible AUTOPSHAPES and images and I need to remove them. These AutoShapes multiply rapidly, are layered on top of each other by the dozens, and bog down the files causing lags and crashes. Unfortunately though, these documents also contain images that are required, so all of the readily available solutions I've found via google that would delete those as well are not helpful. I have tried accessing the selection pane but there are simply so many AutoShapes and images that trying to select all and then just ctrl+deselecting the Pictures crashes the program.

    Please give me some solution, some VBA that I can copy and paste to solve this. But please keep in mind that I am no excel developer, I have no idea what I am doing, I am just desperate for a solution and coming to you all for any help I can get. Please and TIA.

    Additional info, not sure if relevant, all of the AutoShapes seem to be named AutoShape 1 - 6, mostly "AutoShape 4" for some reason. There may be others but I have yet to find any beyond 6. And the images are just named "image". The pictures I want to keep all are named "Picture ###" or "Imagen ###", so I feel like that should help narrow down a way to eliminate and keep items selectively?? Yes, that is Imagen, not image spelled incorrectly.

    Please save me from my excel torture. Bonus point if you also know how to prevent this from happening again.

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: invisible AutoShapes and images are driving me insane, please help me delete them

    You’ll probably be able to get more help if you can post a sample workbook with these images embedded. Nobody’s going to be able to write code or figure out a formula or whatever is necessary without seeing what you’re seeing.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Registered User
    Join Date
    02-14-2024
    Location
    NJ
    MS-Off Ver
    365
    Posts
    7

    Re: invisible AutoShapes and images are driving me insane, please help me delete them

    you can download a redacted version of one of these files here:

    https: //we.tl/t-YxyG6csFO2 (sorry I can't make this a hyperlink, new account and don't have access, please delete the space)

    there are a few Pictures that are needed and then there are hundreds of invisible AutoShapes and Images....

  4. #4
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    1,980

    Re: invisible AutoShapes and images are driving me insane, please help me delete them

    You could try something along these lines

    Please Login or Register  to view this content.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: invisible AutoShapes and images are driving me insane, please help me delete them

    The normal way to do this is F5, special, objects, OK, delete.

    But that will also delete your images.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  6. #6
    Registered User
    Join Date
    02-14-2024
    Location
    NJ
    MS-Off Ver
    365
    Posts
    7

    Re: invisible AutoShapes and images are driving me insane, please help me delete them

    Quote Originally Posted by ByteMarks View Post
    You could try something along these lines

    Please Login or Register  to view this content.
    Thanks for taking a stab at this!
    First popup says "This sheet contains 5095 shapes. Delete Autoshape and Image? Yes/No". Clicked yes. Next popup says "Deleted 0 shapes. 5095 shapes remain."
    Last edited by jgarrettxtreme; 02-15-2024 at 01:24 PM. Reason: add quote

  7. #7
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    1,980

    Re: invisible AutoShapes and images are driving me insane, please help me delete them

    hmm well at least we know how many there are.

    Assuming the ones you want to keep are visible, you could try it like this to delete the hidden ones.

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    11-04-2014
    Location
    Portugal
    MS-Off Ver
    XL2013/XL365
    Posts
    88

    Re: invisible AutoShapes and images are driving me insane, please help me delete them

    I think the problem may be in the name of the Shapes, that is, the "like" instruction is not case sensitive?

    I tried changing the instruction

    Please Login or Register  to view this content.
    for
    Please Login or Register  to view this content.
    And deleted all 5084 shapes
    Last edited by JCabral; 02-16-2024 at 07:12 AM.

  9. #9
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    1,980

    Re: invisible AutoShapes and images are driving me insane, please help me delete them

    Good point.

    I guess I should have used.

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    11-04-2014
    Location
    Portugal
    MS-Off Ver
    XL2013/XL365
    Posts
    88

    Re: invisible AutoShapes and images are driving me insane, please help me delete them

    Quote Originally Posted by ByteMarks View Post
    Good point.

    I guess I should have used.

    Please Login or Register  to view this content.

    The solution has to be this

    Please Login or Register  to view this content.
    because of the space between "AUTOSHAPE" and the "*" and "IMAGE" and the "*".

    If the space is not removed, 278 shapes remain to be deleted

  11. #11
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    1,980

    Re: invisible AutoShapes and images are driving me insane, please help me delete them

    I still think assessing the visibility is the most reliable, especially without seeing the workbook

  12. #12
    Registered User
    Join Date
    11-04-2014
    Location
    Portugal
    MS-Off Ver
    XL2013/XL365
    Posts
    88

    Re: invisible AutoShapes and images are driving me insane, please help me delete them

    Quote Originally Posted by ByteMarks View Post
    I still think assessing the visibility is the most reliable, especially without seeing the workbook
    I would also agree with what you say if the shapes were invisible, the problem is that the shapes are visible but they don't have an outline or are filled, so it has to be your first solution with the rectification you did, ".... UCASE...."

  13. #13
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    1,980

    Re: invisible AutoShapes and images are driving me insane, please help me delete them

    Please Login or Register  to view this content.
    Ah, in that case you're quite right.

  14. #14
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: invisible AutoShapes and images are driving me insane, please help me delete them

    I'm intrigued. Unfortunately, the WeTransfer link has expired. Can you upload a file?


    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file and a mocked up solution.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  15. #15
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: invisible AutoShapes and images are driving me insane, please help me delete them

    I did download it, but have cleared my desktop & emptied my recycle bin !!

  16. #16
    Registered User
    Join Date
    02-14-2024
    Location
    NJ
    MS-Off Ver
    365
    Posts
    7

    Re: invisible AutoShapes and images are driving me insane, please help me delete them

    Quote Originally Posted by JCabral View Post
    I think the problem may be in the name of the Shapes, that is, the "like" instruction is not case sensitive?

    I tried changing the instruction

    Please Login or Register  to view this content.
    for
    Please Login or Register  to view this content.
    And deleted all 5084 shapes
    This worked to delete all of the autoshapes! However it did take a few of the wanted images with it as well. My "Picture*" images remained but my "Imagen*" images got deleted. Is there a way we can make sure those stay?

  17. #17
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: invisible AutoShapes and images are driving me insane, please help me delete them

    I did download it, but have cleared my desktop & emptied my recycle bin !!
    Thank you for sharing

  18. #18
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    1,980

    Re: invisible AutoShapes and images are driving me insane, please help me delete them

    Try it this way which should delete all of them that don't start with Picture or Imagen


    Please Login or Register  to view this content.

  19. #19
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    1,980

    Re: invisible AutoShapes and images are driving me insane, please help me delete them

    but have cleared my desktop & emptied my recycle bin !!
    First person I've known to do that

  20. #20
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: invisible AutoShapes and images are driving me insane, please help me delete them

    TMS - 'twas just to let you know I wasn't ignoring ye.

    Byte Marks... no choice. Laptop storage down to about 5 Gb... I'm away from home at the moment, and have a pile of ripped DVDs with me. The normal mess will recommence next week.

  21. #21
    Registered User
    Join Date
    02-14-2024
    Location
    NJ
    MS-Off Ver
    365
    Posts
    7

    Re: invisible AutoShapes and images are driving me insane, please help me delete them

    Quote Originally Posted by ByteMarks View Post
    Try it this way which should delete all of them that don't start with Picture or Imagen


    Please Login or Register  to view this content.
    IT WORKS! Thank you everyone! I'm happy to say that my document is no longer haunted by autoshape ghosts.

    Next question - any idea how they got there in the first place? My theory is that it has something to do with exporting data from Sage X3 to make these documents, but I don't know enough about how that works to advise my data team.

  22. #22
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: invisible AutoShapes and images are driving me insane, please help me delete them

    If it's web based then the chances are there will be all sorts of stuff relating to the presentation of the page.

    If for example, you select data on this site and paste it into Excel, you'll probably see all sorts of rubbish. I've often copied and pasted data from the member's list and there are lots of images, some visible, some not, that I needed to tidy up.

    Would still like to see the file for my own interest.

  23. #23
    Registered User
    Join Date
    02-14-2024
    Location
    NJ
    MS-Off Ver
    365
    Posts
    7

    Re: invisible AutoShapes and images are driving me insane, please help me delete them

    https: //docs.google. com/spreadsheets/d/10sj9jvrNpDIpXnTDOAeo5Kq2-cUAzisp/edit?usp=drive_link&ouid=105678720280845131017&rtpof=true&sd=true

    If anyone else wants to see the sample file that is filled with over 5000 ghosts, you can download it here.
    Note: delete the 2 spaces in the address, I still cant post links.

  24. #24
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: invisible AutoShapes and images are driving me insane, please help me delete them

    Request for access sent.

    Google Drive
    Request sent
    You’ll get an email letting you know if your request was approved

  25. #25
    Registered User
    Join Date
    02-14-2024
    Location
    NJ
    MS-Off Ver
    365
    Posts
    7

    Re: invisible AutoShapes and images are driving me insane, please help me delete them

    approved. and opened up access to anyone with the link.
    have fun hunting ghosts

  26. #26
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: invisible AutoShapes and images are driving me insane, please help me delete them

    Thank you for sharing the file. Obviously, you already have a solution. My interest was more for my own curiosity and education.

    I took the liberty of plagiarising the code you have been given and carrying out some diagnostics. It wasn't as informative as I'd hoped, but I listed out all the shapes together with some of their properties. The only one that proved useful was the Type. Type 13 is for Pictures and Type 1 is for AutoShapes. Given the requirement, you could adapt the code to delete Shapes with a Type 1.


    Some statistics:

    All 5095
    image 267
    imagen 2
    Picture 9
    AutoShapes 4817
    AutoShape 1 656
    AutoShape 3 699
    AutoShape 4 2860
    AutoShape 6 602
    Type 13 11

    The modified code. Note that the deletion element is blocked as I wasn't interested in deleting the shapes.

    Please Login or Register  to view this content.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Circular reference driving me insane
    By toulouse330 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-08-2021, 11:55 PM
  2. [SOLVED] Runtime 1004 driving me insane!
    By pritch558 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-02-2020, 08:20 AM
  3. Please help, it's driving me insane!! - Image to Word
    By RBLearning in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-18-2019, 09:40 AM
  4. This is driving me insane... please help.
    By ajoh00n in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-17-2015, 10:43 AM
  5. Phantom Breakpoints Driving me insane!
    By fred3 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-04-2014, 01:36 PM
  6. [SOLVED] Sum row until criteria is met (driving me insane!)
    By Mbarnes in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-18-2012, 10:10 AM
  7. Excel time formating driving me insane
    By White noise in forum Excel General
    Replies: 6
    Last Post: 12-09-2006, 09:15 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1