+ Reply to Thread
Results 1 to 7 of 7

Picture Won't Delete

Hybrid View

  1. #1
    Registered User
    Join Date
    11-26-2008
    Location
    San Francisco
    Posts
    33

    Picture Won't Delete

    I am working with a spreadsheet created by a predecessor and there is a picture at the top of one of the worksheets. When I select the picture and hit Delete, it seems to work, but the picture is still there. When I move it around the worksheet and resize it, a copy with the same name ("Picture 47") remains in the spot I moved it from. When I delete the resized/moved picture, it deletes, but the picture still remains in the original spot.

    When I record a macro and select the picture and hit delete - or even when I move the picture and resize it - the recorded macro is blank.

    Any ideas? All of the pictures seem to be named "Picture 47"
    Last edited by negcx; 01-02-2009 at 06:06 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Maybe there are multiple copies of the picture stacked one above the other?

    Post the workbook if you can.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    11-26-2008
    Location
    San Francisco
    Posts
    33
    It's possible but highly unlikely - I've deleted it at least fifty times. I would suspect the picture would have different names if that was the case, but I'm not intimately familiar with Excel object naming conventions.

    I have attached an example workbook.

    Is there some way to write a macro to just loop through all picture objects and delete them?

    Thanks,
    negcx
    Attached Files Attached Files

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    By pressing Alt + f5 > special > select objects > delete that should delete all objects.

    There seems to be a few objects on the sheet

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Dunno.

    Execute these two lines in the immediate window:
    activesheet.shapes.selectall
    selection.delete

  6. #6
    Registered User
    Join Date
    11-26-2008
    Location
    San Francisco
    Posts
    33
    Thanks a lot shg, that worked. I just have no idea what was going on...

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    You're welcome.

    Noob's suggestion would have done the same.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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