+ Reply to Thread
Results 1 to 5 of 5

Remove a shape with user selection

  1. #1
    Registered User
    Join Date
    06-04-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    54

    Remove a shape with user selection

    I have multiple buttons on a worksheet. Under some of the buttons is an oval or rectangular shape. When the user selects a button I am removing any text from the button and making the button not visible.

    I also want to delete the oval or rectangle shape that is at the location of the button.

    The following code runs and does not error out - everything works except it does not find the oval or rectangle in the range specified. Thoughts? Suggestions?

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Remove a shape with user selection

    Jeff

    Have you tried stepping through the code?

    Then you can see what's happening, or, in this case, not happening.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    06-04-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    54

    Re: Remove a shape with user selection

    I have stepped through it but I am not getting why the code is not picking up the shape. Could it be the range of cells it is looking in does not have the "topleftCell" of the shape in it?

  4. #4
    Registered User
    Join Date
    06-04-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    54

    Re: Remove a shape with user selection

    OKAY - the code above actually works. The if statement was not looking for the proper text (there were spaces in the text).... so idiot programmer mistake - sorry for the bother.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Remove a shape with user selection

    Jeff

    I actually thought that might be the problem but had no way to test.

+ 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