+ Reply to Thread
Results 1 to 5 of 5

Trapping a Shape Change Event

  1. #1
    Registered User
    Join Date
    04-24-2012
    Location
    San Francisco
    MS-Off Ver
    Excel 2010
    Posts
    2

    Trapping a Shape Change Event

    Say I have a bunch of shapes on a sheet that were created and positioned using VBA. Then say I want to resize one of the shapes or perhaps move it. How do I trap this so I can record the new location and size of the shape. I've been fiddling with the Worksheet Change event with no luck...

    Regards, John

  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

    Re: Trapping a Shape Change Event

    There is no event when you resize or change a shape.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    04-24-2012
    Location
    San Francisco
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Trapping a Shape Change Event

    OK--is there a work-around? The idea is to trigger code to write the changed coordinates to a cell in the spreadsheet...

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

    Re: Trapping a Shape Change Event

    A work-around like what?

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Trapping a Shape Change Event

    If you use the selection change event of the worksheet you could then check ALL shapes on the sheet to see if anything changed.
    Of course you will only be able to check once the user has finished adjusting shape(s) and actually selects a different cell on the worksheet.

    Assign this macro to shapes.

    code module
    Please Login or Register  to view this content.
    Thisworkbook object
    Please Login or Register  to view this content.
    You will get the hand cursor when selecting the shape but then the sizing anchors will appear. The detail of which shape will appear when the worksheet cell next changes.
    Cheers
    Andy
    www.andypope.info

+ 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