Consulting

Results 1 to 2 of 2

Thread: Select objects inside area

  1. #1

    Select objects inside area

    Hi.
    I wonder how to select objects using visual basic which position is inside a defined area. For example, I have a slide full of thousands of objects but I just like to find the one which is in the very left lower corner. Do I have to iterate through all objects and check for .left und .top property to determine the object which is at the lowest left side?
    It would also help for me to select the object which is near to a certain point or which would intersect an area I define.
    The problem is I have slides which the user can modify (add, move or delete objects) but the user should never delete a certain object being inside a certain area.

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    I don't see how being able to select a shape in an area with vba would stop people being able to move it?? You would have to loop through all shapes to do this though. If it's just one shape this is fairly easy, if it's a range of shapes I would suggest adding the shapenames to an array and selecting the array. Doesn't the shape have a distinct name, if co you can just select it by name. Maybe you could put that shape on a master?

    If your aim is to render certain shapes non selectable this is very difficult to achieve but we can do this for you on a commercial basis (not expensive). You should know though that some badly written add ins that depend of selecting shapes may crash. If you are working in 2007 or 2010 we can also make shapes non movable / resizable but allow colour or text changes.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •