+ Reply to Thread
Results 1 to 4 of 4

macro creating multiple shapes and cannot delete shapes

  1. #1
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2016
    Posts
    313

    macro creating multiple shapes and cannot delete shapes

    I have a spreadsheet with over 500 entries I use for emailing members of a table tennis club. I'm limited to 100 entries per email in outlook 2016 so I have separated them in to different worksheets in my workbook.

    I have all entries in worksheet named "All Entries Sorted" then I have a macro that distributes them to 8 worksheets (75 entries per worksheet). That macro is named "Redistribute". I also have two other macros "DeleteAnEmail" and "AddAnEmail".

    I have 2 shapes which are assigned to those 2 macros. Both macros run correctly in distributing the entries properly, however each time I run "AddAnEmail" from the "All Entries Sorted" worksheet a new shape is generated in the "Group 1" worksheet. I have no clue how that is happening and why it occurs only in the "Group 1" worksheet.

    I also have a problem trying to delete the added shapes - it seems to add a new shape each time I want to add and email to the list, but when I right click on the shape the hit "Cut" nothing happens and the shape stays.

    I now have 20 shapes in "Group 1" where I do not want any shapes - the only shapes I set up and attached to the macros are in the "All Entries Sorted" sheet.

    I did not notice the problem on group 1 until I had run several adds to the list.

    I appreciate any suggestions as to why the shapes are being produced and how to delete the unwanted shapes.

    I changed all email names and all other personal info in the attachment to this post.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: macro creating multiple shapes and cannot delete shapes

    The code for group 1 is different to the other groups.

    Please Login or Register  to view this content.

    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: macro creating multiple shapes and cannot delete shapes

    Delete all shapes on a sheet:

    Please Login or Register  to view this content.

    Try this code instead:
    Please Note you will need to rename Sheets Group 1 and Group 2 so they only have one space.

    Please Login or Register  to view this content.
    Last edited by mehmetcik; 05-01-2020 at 04:06 PM.

  4. #4
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2016
    Posts
    313

    Re: macro creating multiple shapes and cannot delete shapes

    I added the line of code [code] Application.CutCopyMode = False [\code] to the group 1 code but same thing occured.

    I have decided on doing a work-around, so will close this thread as solved.

    thanks so much for you help

+ 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. Making VBA Macro to make shapes disappear if cell has certain value (Multiple Shapes)
    By Nicholaes in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-29-2019, 06:33 PM
  2. [SOLVED] Macro for ActiveSheet.Shapes.Delete
    By max_max in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-10-2018, 03:41 PM
  3. Replies: 5
    Last Post: 08-11-2017, 03:05 PM
  4. excel 2013 customize context shapes and shapes group menu right click
    By Giuseppe77 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 12-03-2016, 11:50 AM
  5. [SOLVED] VBA to delete all shapes unless a macro is assigned to it
    By BillDoor in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-22-2016, 10:41 AM
  6. Delete all shapes in specified range with macro
    By digiac in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-16-2013, 08:01 AM
  7. How To Move Shapes From Another Shapes? (floating shapes)
    By MarcLev in forum Word Programming / VBA / Macros
    Replies: 2
    Last Post: 10-04-2009, 04:04 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