+ Reply to Thread
Results 1 to 7 of 7

Deleting specific shapes not all in excel - Macro

  1. #1
    Registered User
    Join Date
    11-27-2012
    Location
    Adelaide, south australia
    MS-Off Ver
    Excel 2013
    Posts
    26

    Post Deleting specific shapes not all in excel - Macro

    Hi

    I need a macro that deletes/removes specific shapes in an excel spread sheet.

    The problem is the i want to remove shapes / object ( jpegs with signatures) and not the Jpeg that is a logo for each letter.

    I have a macro that copies a object (signatures) and pastes to a range for each letter in the same sheet. Then I need to remove the objects (signatures) once printed leaving the main signatures and logos.

    I tried recording a macro but it didn't work. The best way to do this would be to name the range where the shapes are situated and remove.

    I have a macro that copy and paste the shapes from another column outside the letter therefore the picture name changes with every new paste so I can not select by picture name eg(number) picture 1

    range(a2:c2)
    Range(a25:c25) and so on

    There might be some ranges that are blank so this might cause the macro to error.

    The other option is to name the objects(logos) in the column of the letter that are to stay and delete the remainder
    Thank you in advance.

  2. #2
    Forum Contributor
    Join Date
    10-25-2011
    Location
    Preston, England
    MS-Off Ver
    Excel 2016
    Posts
    136

    Re: Deleting specific shapes not all in excel - Macro

    Can you upload a cleansed sample workbook?

  3. #3
    Registered User
    Join Date
    11-27-2012
    Location
    Adelaide, south australia
    MS-Off Ver
    Excel 2013
    Posts
    26

    Re: Deleting specific shapes not all in excel - Macro

    Hi

    I have uploaded my file,

    Thank you for your help
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    11-27-2012
    Location
    Adelaide, south australia
    MS-Off Ver
    Excel 2013
    Posts
    26

    Re: Deleting specific shapes not all in excel - Macro

    Please see above attached file
    Thank you

  5. #5
    Forum Contributor
    Join Date
    10-25-2011
    Location
    Preston, England
    MS-Off Ver
    Excel 2016
    Posts
    136

    Re: Deleting specific shapes not all in excel - Macro

    Sorry for not getting back to you. I'll have a look at this today.

  6. #6
    Forum Contributor
    Join Date
    10-25-2011
    Location
    Preston, England
    MS-Off Ver
    Excel 2016
    Posts
    136

    Re: Deleting specific shapes not all in excel - Macro

    Hi,

    Insert the below into a module and assign to your "Remove Signatures" button.

    Please Login or Register  to view this content.
    There are other ways to optimise your code if you are interested, such as using the name dropdown in conjunction with a "Refresh" button, choose the signature based on a variable. At the moment you have a separate button and macro to populate each signature.

    If you would like me to have a go, please let me know.

    Regards Radddogg

  7. #7
    Registered User
    Join Date
    11-27-2012
    Location
    Adelaide, south australia
    MS-Off Ver
    Excel 2013
    Posts
    26

    Re: Deleting specific shapes not all in excel - Macro

    Thank you Radddogg, it worked prefectly

+ 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. [SOLVED] Shapes and Deleting Shapes
    By rob_h in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-24-2017, 10:07 AM
  2. Macro falling down at specific PPSlide.Shapes.Paste.Select
    By Matcham in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-02-2016, 09:00 AM
  3. Excel VBA Macro - Deleting Specific Data based on criteria
    By MD011 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-08-2014, 01:06 PM
  4. excel 2002 -shapes deleting themselves
    By SuitedAces in forum Excel General
    Replies: 0
    Last Post: 11-15-2012, 11:15 PM
  5. [SOLVED] Group Specific Shapes Excel VBA
    By Ganesh7299 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-13-2012, 02:26 AM
  6. Deleting Specific Shapes
    By FrankStallone in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-15-2006, 01:43 AM
  7. [SOLVED] excel crashing after deleting shapes
    By slarbie in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-28-2006, 01:35 PM

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